KatInterview

Build a time-series monitoring platform with alerts

System DesignModel answer
MediumModel answerSystem Designtime-seriesobservabilitystreaming

Last updated

Design an observability system that ingests high-volume metrics, supports real-time dashboards and historical analysis, and evaluates alerting rules.

You need to design a monitoring platform that collects and stores time-series metrics from distributed services.

Core capabilities:

  1. Metric ingestion: Accept time-series data (counters, gauges, histograms) from thousands of hosts at high volume.
  2. Real-time queries: Power live dashboards with low-latency reads over recent time windows.
  3. Historical analysis: Support slower, deeper queries over months of data for trend analysis and debugging.
  4. Alerting: Evaluate user-defined conditions (threshold breaches, anomalous rates) and route notifications.

System properties:

  • Must scale horizontally to handle write-heavy workloads and traffic surges.
  • Remain available during partial component failures.
  • Isolate tenants to prevent one noisy workload from affecting others.
  • Handle graceful degradation under backpressure.

Describe the end-to-end architecture, data model, storage strategy, and alert evaluation mechanism. Discuss trade-offs in retention policies, query patterns, and high-cardinality scenarios.

Hints

Hint 1

Time-series data is append-only and queries focus heavily on recent intervals. How does this shape storage decisions?

Hint 2

Separating hot (recent) and cold (historical) paths lets you optimize each independently. What does each path prioritize?

Hint 3

High cardinality—when label combinations explode—is the most common scaling bottleneck. What prevents it?