Real-Time Anomaly Detection at Scale
Design a system that detects anomalies across millions of time series metrics for infrastructure monitoring.
Scenario: A cloud platform monitors 5 million time series metrics (CPU, memory, network, latency, error rates) across 100,000 servers. The system must detect anomalies within 60 seconds, distinguish real incidents from noise, correlate related anomalies into incidents, and minimize alert fatigue from false alarms.
Your Task: Design the anomaly detection and alerting pipeline for this scale.
Your design should address:
- Processing millions of time series in real-time with bounded latency
- Detecting anomalies in diverse metric shapes (spiky, periodic, trending)
- Reducing false positives through contextual analysis and correlation
- Grouping related anomalies into incidents for efficient triage
- Adapting to changing baselines (deployments, traffic growth)
Think about: Seasonal patterns (daily, weekly), metric interdependencies, cold-start for new metrics, alert routing and escalation, and the cost of missed alerts vs false alarms.