# Anomaly detection using Z-score analysis
def detect_anomalies(stream, threshold):
mean = np.mean(stream)
std = np.std(stream)
anomalies = [val for val in stream if abs(val-mean) > threshold*std]
return anomalies
🌐 Distributed Resilience Lab
Challenge
Implement a dynamic load-balancing strategy that automatically routes traffic away from compromised nodes.
✔️ Successfully rerouted 85% of traffic during node failure