The FLP result says consensus cannot be guaranteed to terminate in an asynchronous system with one crash. Raft and Paxos are used everywhere. How do they get around it?
Sketch your own answer first, then compare it with the one below.
A strong answer
They do not get around it. They give up the guarantee the theorem forbids, which is termination, and keep the one it allows, which is safety. Raft never produces two leaders in a term or two different committed entries at one index, no matter how the network behaves. What it cannot promise is that an election ever finishes.
What makes elections finish in practice is timing assumptions the proof does not make. Randomised timeouts make it unlikely that candidates keep colliding, and real networks are mostly synchronous, with bounded delays most of the time. The partially synchronous model captures this: after some unknown stabilisation time, delays are bounded, and progress follows.
The link to failure detection is direct. The timeout that drives elections is an unreliable failure detector, and FLP says it cannot be made reliable. Raft is built so that this unreliability only ever costs availability, never correctness. Paxos makes the same split: the acceptors' promise and accept rules are safe on their own, and the leader election that makes it live is a separate, timing-dependent concern.
Sources
- Michael J. Fischer, Nancy A. Lynch, Michael S. Paterson (1985). Impossibility of distributed consensus with one faulty process.
- Leslie Lamport (2001). Paxos Made Simple.