Try
↑ ↓ move↵ openesc close
In this lesson · topic 3 of 7
  1. 1. Silence is all you get
  2. 2. Heartbeats, timeouts and suspicion
  3. 3. Slide one detector along its curve
  4. 4. When a 600 ms pause beats the detector
  5. 5. Watching three hundred nodes without three hundred heartbeats each
  6. 6. Adding up a failover, and the storm a false alarm can start
  7. 7. Check the ten-second timeout

Topic 3

Slide one detector along its curve

7 min read

One stream, many detectors

The lab watches one node. It sends heartbeats over a network with delay jitter, pauses now and then, and crashes every ten seconds. Eleven fixed timeouts and ten phi thresholds all see the same arrivals, so the two charts are the live tradeoff: false alarms per minute of uptime against detection time, for every setting at once. The timeout and threshold you pick are marked on the curves and shown in detail above them.

Predict before you press play

With pauses switched off and jitter low, which detects a crash sooner: a fixed 300 ms timeout, or phi with threshold 8?

node is alivesilence 92 msφ = 0.2intervals: mean 101 ms, spread 21 ms

each line is a heartbeat arriving at the monitor; the shaded end is the silence since the last one (92 ms)red line: a gap over twice the heartbeat interval · scale 300 ms

Fixed timeout 300 ms says alive
0 false alarms in 11 s alive · detects a crash in 240 ms

Phi accrual, threshold 8 says alive
0 false alarms in 11 s alive · detects a crash in 160 ms

heartbeats seen
109
pauses
1
crashes
1
alive time
11s
Fixed timeout: false alarms against detection time
Fixed timeout: false alarms against detection time. Text version available below the chart.0.05.010.015.020.01505002000yours: 300 mstimeout (ms)per minute, or seconds
Phi accrual: false alarms against detection time
Phi accrual: false alarms against detection time. Text version available below the chart.0.012.525.037.550.01616yours: φ 8threshold φper minute, or seconds

What just happened

  1. 14.00 s node restarted
  2. 10.24 s fixed 300 ms suspects the node
  3. 10.16 s phi 8 suspects the node
  4. 10.00 s node crashed
  5. 5.74 s pause of 160 ms begins

Full-page version with guided experiments: Failure detection lab.

Things to try

  1. Slide the fixed timeout from 100 ms to 2000 ms and watch your marker move along the curve. The false alarm line falls and the detection line rises. They never both improve.
  2. Set pauses per minute to 0. Now the only silences come from the network. Raise jitter and watch which detector complains.
  3. Set the longest pause to 1500 ms. Any timeout below it fires on every long pause. Any timeout above it needs more than a second to see a crash.
  4. Change the seed. The exact counts move. The shape of the curves does not.

The full-page lab has five guided experiments with one-click setups.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms