Skip to content
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

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
1checker → host · probe rack r12 ✗A switch next to one checker fails. That checker can no longer reach any of rack r12’s 40 hosts.1 / 3

The numbers, at a glance

Each host is probed from……3 vantage points; 2 must agree
2 agree: down3 checkers per host
Points in a 7-day graphOne series
Pages for one switch failure2,000 hosts behind it
Group by failure domain, and hold back the alerts a known failure causes.

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.

Metrics stop
Too noisy
collector crashes
2,000 hosts silent
2,000 pages
+ Free.− Any failure on the path looks like the host.
One prober
One bad path
switch near prober fails
rack r12 looks dead
40 false pages
+ Simple and fast.− A switch near the prober fakes a dead rack.
3 vantage points, 2 agree
Our pick
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.

Stage 1 · ≈ 1,000 hostsMake it work
Hosts
Monitoring server
Time-series DBAlert rules
One monitoring server, one database, “no data” means down.
Stage 2 · ≈ 100,000 hostsIngest at scale
Hosts
Collectors × 50
Ingest log
TSDB × 16 shardsAlert rulesQuery API
Collectors per data center, an ingest log, 16 shards.
Stage 3 · + 60,000 probes/sDetect failures right
Checkers × 30Hosts
Failure detectorCollectors
Ingest log
TSDBAlert manager + groupingQuery API
3 vantage points, 2 must agree; one page per failure domain.
Stage 4 · + 1,000 queries/sLong range and the watcher
CheckersHosts
Failure detectorCollectors
Ingest log
TSDBRollup workersAlert managerWatchdog
Rollups for long graphs; a watchdog outside the system.
Was this walkthrough useful?Your vote tells us what to improve next.