System Design
6. Distributed Systems FundamentalsAnimated
Paxos Algorithm
The classic consensus protocol.
The idea
Proposers prepare and accept with numbered proposals; acceptors promise and accept; a majority chooses a value.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
Phase 1a: a proposer picks a ballot number and asks acceptors to promise not to accept lower ones.
- step:
- 1/7
- from:
- Proposer
- to:
- Acceptor 1
1/7
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Prepare with proposal n
- 2Acceptors promise
- 3Send accept
- 4Majority accepts, value chosen
Where it is used
Foundational and used in Chubby and Spanner.
Watch out for
Hard to understand and implement correctly.