Failure detection lab
One node sends heartbeats over a jittery network and sometimes pauses. A fixed timeout and a phi accrual detector watch it. See how fast each notices a real crash, and how often each cries wolf.
node is alivesilence 92 msφ = 0.2intervals: mean 101 ms, spread 21 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
| Series | Latest | Lowest | Highest |
|---|---|---|---|
| false alarms per minute alive | 0.0 | 0.0 | 10.9 |
| detection time, seconds | 1.9 | 0.1 | 1.9 |
Events: yours: 300 ms at 300.
| Series | Latest | Lowest | Highest |
|---|---|---|---|
| false alarms per minute alive | 0.0 | 0.0 | 27.3 |
| detection time, seconds | 0.2 | 0.1 | 0.2 |
Events: yours: φ 8 at 8.
What just happened
- 14.00 s node restarted
- 10.24 s fixed 300 ms suspects the node
- 10.16 s phi 8 suspects the node
- 10.00 s node crashed
- 5.74 s pause of 160 ms begins
| Timeout | False alarms | Per minute alive | Mean detection |
|---|---|---|---|
| 150 ms | 2 | 10.9 | 90 ms |
| 200 ms | 0 | 0.0 | 140 ms |
| 250 ms | 0 | 0.0 | 190 ms |
| 300 ms | 0 | 0.0 | 240 ms |
| 400 ms | 0 | 0.0 | 340 ms |
| 500 ms | 0 | 0.0 | 440 ms |
| 600 ms | 0 | 0.0 | 540 ms |
| 800 ms | 0 | 0.0 | 740 ms |
| 1000 ms | 0 | 0.0 | 940 ms |
| 1500 ms | 0 | 0.0 | 1440 ms |
| 2000 ms | 0 | 0.0 | 1940 ms |
| Threshold | False alarms | Per minute alive | Mean detection |
|---|---|---|---|
| φ 1 | 5 | 27.3 | 60 ms |
| φ 2 | 4 | 21.8 | 90 ms |
| φ 3 | 2 | 10.9 | 100 ms |
| φ 4 | 2 | 10.9 | 120 ms |
| φ 5 | 2 | 10.9 | 130 ms |
| φ 6 | 1 | 5.5 | 140 ms |
| φ 8 | 0 | 0.0 | 160 ms |
| φ 10 | 0 | 0.0 | 170 ms |
| φ 12 | 0 | 0.0 | 190 ms |
| φ 16 | 0 | 0.0 | 210 ms |
What to try
Each one sets up a starting point. Then make the change it describes.
Short timeout, loud detector
Set the fixed timeout to 150 ms and let a crash cycle go by. Read the false alarm count and the detection time.
Look for. The detector catches the crash fast, and it also declares the node dead during every pause and every unlucky delay. The red line on the curve is high at the left.
Long timeout, slow detector
Set the fixed timeout to 1500 ms.
Look for. False alarms fall toward zero. A real crash now goes unnoticed for about fifteen heartbeats. Nothing in between is free. Every timeout is a point on the same curve.
A quiet network
Set pauses per minute to 0 and jitter to 0.2, then compare the detection time of phi 8 against the fixed 300 ms.
Look for. The phi detector learns that heartbeats are regular and suspects after a much shorter silence than 300 ms, so it detects the crash sooner. Its threshold is relative to what it has seen.
A noisy network
Set the network delay to 100 ms and the jitter to 2 with no pauses. Watch the fixed 300 ms detector.
Look for. The fixed timeout fires again and again on nothing but slow packets. Phi widens its own idea of normal and stays mostly quiet, at the cost of slower detection.
Long pauses defeat every detector
Set the longest pause to 1500 ms and pauses per minute to 20. Move the fixed timeout anywhere you like.
Look for. A paused node and a dead node look identical from outside until the pause ends. Any timeout shorter than the pause raises a false alarm. Any timeout longer than it is slow to see a crash. That is the asynchronous network problem in one dial.
New to the idea? Read the lesson first. Every number here comes from a seeded simulator, so the same seed gives the same run.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms