Consensus and Why Agreement Is Hard
Several machines have to agree on one value even though some may fail and messages may be delayed. A majority quorum plus a leader gets there in practice, and the theory says no deterministic protocol can guarantee both safety and progress when delays have no bound and a node may crash.
What a learner can do afterwards
- Explain why a majority quorum makes two conflicting decisions impossible
- Follow a leader election and say what happens if the old leader returns
- State what the impossibility result rules out and what it leaves available
1 · Read
You already know copies can disagree and silence hides crashes. Consensus asks several machines to agree on one value even though some may fail and messages may be late. A majority means more than half. Two groups of a and b nodes drawn from n nodes share at least a + b - n of them. Two majorities of 5 nodes are groups of 3, and 3 + 3 - 5 = 1, so they always share a node.
Five nodes must pick one leader. Three vote for Ana and two for Ben, so Ana wins a majority. No rival group of three can vote for Ben without including someone who already voted for Ana, and nobody votes twice. Two conflicting decisions are impossible.
In practice a leader coordinates: it is elected, gathers votes, and announces the decision. Each election starts a new, higher term number. If the old leader returns after a failure, it sees the higher term, so the newer term wins and the old leader steps down instead of ruling beside it.
Theory adds one limit. When message delays have no bound and even one node may crash, no deterministic protocol can guarantee both safety and progress. That rules out a perfect protocol. It leaves practical ones that always stay safe and usually finish.
Majorities overlap so conflicts are impossible, a leader coordinates, and unbounded delay rules out perfection but not practice.
Original instructional content authored for os-taxonomy.
2 · Watch
En anglaisTake it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.