Try
↑ ↓ move↵ openesc close

Interview prep / Failure detection

Junior · Failure detection · System design interview question

A health check marks a server dead and traffic is moved away, but the server was only slow. What goes wrong, and how do systems limit the damage?

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

A strong answer

The server was still working. If it was a leader, a lock holder or a primary, the system may now have two of them for a while. Moved traffic can overload the remaining servers, and the slow server may come back and keep acting on stale decisions.

Systems limit the damage in a few ways. Decisions made on a suspicion are made revocable or versioned, so a returning node can be fenced off. Terms, epochs or tokens let everyone tell old authority from new. Failover is rate limited so one flapping check cannot churn the cluster.

Do not try to fix this in the detector. Making it slower only trades false alarms for slow detection. The fix is in what the system does with a suspicion.

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