Try
↑ ↓ move↵ openesc close

Interview prep / Failure detection

Mid · Failure detection · System design interview question

Your single health monitor sits in one availability zone. At 3 a.m. it reports every node in another zone as dead. How do you tell a real outage from a problem with the monitor's own view, and what should the system do?

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

A strong answer

Start with the pattern. Real failures rarely take out a whole zone's nodes at exactly the same moment, while a broken link between the monitor and that zone does. A sudden, perfectly correlated change across many independent nodes points at the observer or the path to it.

To check, ask other observers. Nodes in the zone can report on each other, and probes from a second zone tell you whether the zone is reachable from elsewhere. If the nodes see each other and clients in other zones can reach them, the zone is fine and the monitor is blind.

The system should be built so that the monitor's suspicion alone cannot cause drastic action. A rule such as "if more than 20 percent of the fleet turns suspect at once, freeze automated failover and page a person" turns a bad view into an alert instead of a mass migration. Where an action must change who is the leader, it should go through a quorum of nodes, not a single observer. A lone observer is one vantage point, and it can be the part that is partitioned.

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