SD-39 · Back to the write-up
Design a Cluster Health Monitoring
Checkers from 3 vantage points decide which hosts are down by agreement, metrics flow through collectors and a log into a sharded time-series database, and one failure becomes one page.
Follow a request
A sample’s journey
A host dies
A broken path, no false alarm
A switch fails: one page
Dashboard in an incident
The monitor dies
Data centers
Ingest + detect
Storage
Alerting
People
Checkers3 vantage points
Hosts + agents100,000
CollectorsPer data center
Failure detector2 of 3 agree
Ingest log6 hours
Time-series DB16 shards
Rollup workers5 min, 1 h
Alert managerGroup + route
WatchdogAnother cloud
Paging serviceOn-call
Query APIDashboards
EngineersDashboards
The numbers, at a glance
2 agree: down3 checkers per host
60,480Raw 10 s
2,0165-min rollup
1 page with grouping2,000 pages without
Detecting a dead host, in order
Probes every 5 s; down after 3 misses from 2 of 3 vantage points.
Checker A
Checker B
Host h1234
Failure detector
Alert manager
On-call
1 probe ✗ (×3, 15 s)
2 probe ✗ (×3, 15 s)
3 h1234 missed 3
4 h1234 missed 3
5 host_down h1234 (2 of 3)
6 page, grouped by rack
7 ack
RequestResponseAsync, does not block
How we decide a host is down
The decision this question is really about.
collector crashes
2,000 hosts silent
2,000 pages
+ Free.− Any failure on the path looks like the host.
switch near prober fails
rack r12 looks dead
40 false pages
+ Simple and fast.− A switch near the prober fakes a dead rack.
checker A ✗checker B ✓checker C ✓
1 of 3: path suspect
no false page
+ Tells a dead host from a broken path.− 3× probes and a detector.
How it grows
Add a box only when a number forces you to. Highlighted boxes are new at each stage.
Hosts
Monitoring server
Time-series DBAlert rules
Hosts
Collectors × 50
Ingest log
TSDB × 16 shardsAlert rulesQuery API
Checkers × 30Hosts
Failure detectorCollectors
Ingest log
TSDBAlert manager + groupingQuery API
CheckersHosts
Failure detectorCollectors
Ingest log
TSDBRollup workersAlert managerWatchdog
Was this walkthrough useful?Your vote tells us what to improve next.