Load/Bearing
High-level design · 16 of 22

Monitoring and alerting systems

Take in a flood of alerts without dropping one, collapse them into incidents a person can act on, and keep working when everything else is on fire.

3 min readUsed in: 15 · Alert Storm

An alerting system receives alerts from monitoring tools, deduplicates and groups them, decides who to page, and keeps a history. Its hardest requirement is that it must work best exactly when everything else is failing, because that's when alert volume spikes.

SOURCESPrometheus, appsRECEIVERSstatelessKAFKAacks=all · RF 3DEDUPEby fingerprintCORRELATEservice graphROUTERon-call, escalation
Receivers acknowledge only after a durable write. Partitioning by fingerprint gives each alert's state a single owner.

Ingest: 100,000 alerts a minute, none lost

100,000 a minute is about 1,700 per second on average, and incidents produce storms ten times that. "Without losing any" means three things:

Deduplication: key, window, state

Correlation: from alerts to incidents

Storage: hot, cold, retention

DataHot (fast, expensive)Cold (cheap)Retention
Open alerts and incidentsIn memory + PostgreSQLUntil resolved
Alert historyPostgreSQL or Elasticsearch, indexed by service and timeParquet files in object storage30 days hot, 1–2 years cold
MetricsTime-series DB at full resolutionDownsampled rollups (5 min, 1 h)15 days raw, a year of rollups

Partition history tables by day, so retention means dropping whole partitions, which is much cheaper than DELETE on a large table.

Monitoring the monitor

Writing it up

For a formal design document or a design-round answer, use this order: problem and users; functional and non-functional requirements; numbers; API and data model; architecture diagram; deep dives (ingest durability, dedupe state, correlation); failure modes; trade-offs and what you'd do next. See running a design interview for the timing.

Interview checklist

Practise it

Level 15: Alert Storm

Put this into practice against live traffic. Your progress in the game is saved in your browser.

Play level 15

Further reading