Home/Labs/Paxos Round Driver
All 280 Labs
INTERACTIVE LAB📜

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.

Acceptors (persistent state)
A1
prom=—
—
A2
prom=—
—
A3
prom=—
—
A4
prom=—
—
A5
prom=—
—
Stage
IDLE
N
11
Messages
0
Lost rounds
0
Protocol log
  • → 5 acceptors online. Quorum = 3. Press Advance Step to drive a Paxos round.
Nothing committed yet. Note the invariant: once a value is accepted by a quorum, every future round MUST re-propose it — that is what the Promise carrying (acceptedN, acceptedValue) in Phase 1b protects.

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.
Interview Round Script

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.

Key Trade-Offs

Ballot preemption guarantees safety without leaders but costs extra rounds — and can livelock without one.

Related Curriculum Chapter

Paxos: The Classical Consensus Protocol

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs