Try
↑ ↓ move↵ openesc close

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

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

What to try

Each one sets up a starting point. Then make the change it describes.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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