Try
↑ ↓ move↵ openesc close

Interview prep / Failure detection

Junior · Failure detection · System design interview question

Why can a node in a distributed system not reliably tell whether another node has crashed or is just slow?

Sketch your own answer first, then compare it with the one below.

A strong answer

All it can observe is silence. A crashed node sends nothing. A node that is alive but stuck in a garbage collection pause, swapped out, or behind a congested link also sends nothing for a while. From the outside the two look the same until the silence ends, and only a crash never ends it.

In a network with no upper bound on delay, no amount of waiting proves a crash. Any timeout you pick is a bet: wait longer and you miss real failures for longer, wait less and you declare live nodes dead.

So the real design question is what happens after a suspicion. Failing over, re-electing a leader and reassigning a lock must all stay correct if the suspected node was alive and comes back.

Sources

Learn it by running it

The failure detection lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

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