Skip to content
StackDecode
System Design
6. Distributed Systems FundamentalsAnimated

Failure Detection

Noticing that a node has failed.

The idea

Heartbeats and timeouts suspect failures; accrual detectors give a probability instead.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Node ANode BNode Cstate digest
  • current message
  • earlier
  • failure or attack

Every second each node picks a random peer and shares what it knows.

step:
1/5
from:
Node A
to:
Node B
1/5

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Nodes send heartbeats
  2. 2Missing ones raise suspicion
  3. 3After timeout mark as failed
  4. 4Trigger recovery

Where it is used

Clusters.

Watch out for

You cannot tell slow from dead. Tune timeouts.

Related