THE MACHINE ROOM

ACT 01 · CONSENSUS

Five servers agree on one order of events, with no server in charge.

NO LEADERterm 0 · 5/5 up · 0 committed of 0

Every node runs a randomised countdown. The first to reach zero asks the others to vote for it; a majority makes it leader for that term, and the leader is the only node that accepts writes. Kill it and watch the countdown decide the next one. Split the network and watch the minority side go quiet — it cannot reach a majority, so it must not pretend to be in charge.

what is actually running

A real Raft implementation: terms, the log up-to-date check on votes, the consistency check on append, truncation of a diverging log, and commit only when a majority holds an entry from the leader's own term. Messages take time and the wire can drop them. Not here: snapshots, log compaction, joint-consensus membership change.