Paxos Prepare-Accept Rounds Lab (Interactive)
Drive Prepare and Accept phases across five acceptors while a rival proposer fights for promised. Step through Basic Paxos round by round: promises with ballot numbers, accepted-value carry-forward, and the preemption race a rival proposer forces on your promises.
Basic & Multi-Paxos Round Driver
Step through Prepare/Promise and Accept/Accepted over a 5-acceptor quorum, then race a rival proposer to feel the livelock.
- → 5 acceptors online. Quorum = 3. Press Advance Step to drive a Paxos round.
Multi-Paxos mode: the first Advance Step pair elects a leader (Phase 1 once), after which "Client write" commits with only the Accept/Accepted roundtrip — exactly the optimization that let Chubby and Spanner run Paxos at datacenter throughput.
How It Works Under the Hood
Basic Paxos reaches consensus on one value through two phases: a proposer asks acceptors to promise not to answer lower ballots, and acceptors that promised return any value they already accepted so the proposer must carry it forward — the invariant that makes two values impossible. Multi-Paxos skips Prepare for a stable leader, cutting consensus to a single round trip per decision, which is what real systems use. This lab renders each acceptor’s promised and accepted state per round, lets a rival proposer preempt your promises to show livelock, and counts messages so you feel exactly what Basic Paxos pays per value.
Core Architectural Principles
- Promise rule: acceptors reject lower-ballot Prepare after promising, enforcing monotonic ballots.
- Accepted-value carry-forward keeps a newer proposal from inventing a second truth.
- Basic vs Multi-Paxos toggle halves round trips once a stable leader owns the instance.
If asked to explain Paxos, walk one Prepare/Promise then Accept/Accepted with ballot numbers — do not recite “majority” alone. Then note why nobody ships raw Basic Paxos: two proposers alternating yields livelock, so production uses Multi-Paxos with a leader, which is Raft’s whole pitch.
Ballot preemption guarantees safety without leaders but costs extra rounds — and can livelock without one.