PAPER EXPLAINED
Paxos Made Simple
IntermediateAbout 30 min to read the paper
TL;DR
Lamport re-explains Paxos in plain English. He derives a two-phase consensus protocol from its safety requirements, then shows how a leader running many consensus instances can implement a fault-tolerant replicated state machine.
What problem does Paxos solve?
Processes that propose values must agree on a single one, even though they run at arbitrary speeds, can crash and restart, and communicate by messages that may be delayed, duplicated, or lost. A single acceptor is simple but halts the system if it fails. With many acceptors, concurrent proposals can split the votes so that no value wins, or a value is chosen without some acceptors knowing. The paper also notes that the original Paxos presentation was widely considered hard to understand. A clearer explanation was therefore needed.
The core idea
A value counts as chosen when a majority of acceptors accept the same numbered proposal. Because any two majorities overlap, information about earlier choices cannot be lost. Before proposing, a proposer asks a majority to promise to ignore lower-numbered proposals and to report what they have already accepted. It must then propose the highest-numbered value reported, if any, so a value that may already be chosen is never overridden. Repeating this agreement for each slot in a command sequence, with one elected leader doing the proposing, keeps a group of servers running the same deterministic state machine.
IN THE AUTHORS’ WORDS
“The Paxos algorithm, when presented in plain English, is very simple.”
Paxos Made Simple, p. 2
“Instead of trying to predict the future, the proposer controls it by extracting a promise that there won’t be any such acceptances.”
Paxos Made Simple, p. 7
“However, safety is ensured regardless of the success or failure of the election.”
Paxos Made Simple, p. 10
How Paxos works
- Use multiple acceptors and say a value is chosen once a majority accepts a single proposal. Each proposal carries a unique number, so acceptors can accept more than one proposal without confusion.
- Strengthen the requirement step by step until it becomes something a proposer can enforce: once value v is chosen, every higher-numbered proposal must carry v. This leads to invariant P2c, which is stated in terms of what some majority has accepted below number n.
- Phase 1: a proposer picks number n and sends prepare requests to a majority. An acceptor that has not answered a higher-numbered prepare replies with a promise to reject proposals below n, together with the highest-numbered proposal it has accepted.
- Phase 2: once a majority has replied, the proposer sends accept requests with number n. The value is that of the highest-numbered reported proposal, or any value if none was reported. Acceptors accept unless they have promised a higher number.
- Learners find out about a chosen value from acceptors, either directly or through one or more distinguished learners. This trades message count against reliability.
- To ensure progress, a single distinguished proposer (leader) issues proposals. Each proposer draws numbers from a disjoint set, and acceptors keep their state in stable storage across restarts.
- For a state machine, the i-th consensus instance chooses the i-th command. A new leader runs phase 1 for all unfinished instances at once and fills gaps with no-op commands. After that it needs only phase 2 for each new client command.
Results
This is an algorithm explanation, not an empirical study, and it reports no experiments. It argues informally that the prepare/accept protocol satisfies the safety requirements, assuming unique proposal numbers, non-Byzantine failures, and acceptors that remember their state across restarts. It shows that safety holds even when leader election fails, while progress requires a single working leader with access to a majority. Citing prior work, it states that phase 2 has the minimum possible cost of any fault-tolerant agreement algorithm, and concludes that Paxos is essentially optimal in normal operation. That claim assumes leader changes are rare.
Limitations and what came later
- The paper assumes non-Byzantine failures: agents may stop or restart, and messages are never corrupted. It does not handle malicious or arbitrarily faulty behavior.
- Liveness is not precisely specified or guaranteed. Competing proposers can block progress indefinitely, and reliable leader election requires randomness or real time such as timeouts.
- Correctness depends on unique proposal numbers and on acceptors keeping their state in stable storage that survives failures.
- Reconfiguration of the server set is only sketched, and the main state machine discussion assumes a fixed set of servers.
- The arguments are informal prose with no experimental evaluation. The optimality claim relies on a cited external result.
Why Paxos matters
Agreement among unreliable machines underlies any replicated service that must stay consistent when components fail. The paper presents the Paxos consensus algorithm compactly and clearly separates safety from progress. It shows how consensus extends to a replicated state machine with an efficient leader-based normal case, gap handling, and a route to reconfiguration. These are the core ideas for reasoning about fault-tolerant distributed systems.
This short paper derives the core of the Paxos consensus algorithm step by step from the properties it must satisfy, so the reader sees why each rule exists instead of memorizing a protocol. It starts from a naive single-acceptor design and adds majorities, proposal numbers, and finally the prepare/promise mechanism, each to fix a concrete failure scenario. It then shows how running many consensus instances, coordinated by an elected leader, yields a fault-tolerant replicated state machine, including how a new leader fills gaps with no-op commands. It also separates safety (never choosing two values) from progress (eventually choosing one), and explains why progress needs a single leader while safety holds regardless. The paper is about eleven pages of prose with no heavy formalism, so it is a demanding but approachable way to learn how fault-tolerant agreement works.
Before you read
Who it’s for
Students and engineers studying distributed systems who want to understand how agreement can be reached among unreliable processes and messages, and anyone building or reasoning about replicated services.
What to know first
- Basic idea of processes communicating by messages over a network
- Comfort with proof by induction and reasoning about invariants
- Awareness of crash failures and message loss in distributed systems
- Familiarity with the notion of a deterministic state machine
Glossary
- Consensus
- The problem of getting a collection of processes to choose exactly one value from those proposed, and letting processes learn which value was chosen.
- Proposer, acceptor, learner
- The three agent roles in the algorithm. Proposers suggest values, acceptors accept proposals, and learners find out which value was chosen. One process may play several roles.
- Majority (quorum)
- Any set containing more than half the acceptors. Any two majorities share at least one acceptor, which is what keeps choices consistent.
- Prepare request
- A phase 1 message with number n. It asks acceptors to promise to ignore proposals numbered below n and to report the highest-numbered proposal they have accepted.
- Accept request
- A phase 2 message asking acceptors to accept a proposal with a specific number and value.
- Safety vs. liveness
- Safety means nothing bad happens, for example two different values being chosen. Liveness means something good eventually happens, for example some value being chosen. Paxos guarantees safety always, and liveness only under a working single leader.
- Distinguished proposer (leader)
- A single elected proposer that is the only one issuing proposals. This avoids competing proposers blocking each other.
- State machine approach
- Building a fault-tolerant service by having multiple servers execute the same sequence of commands on a deterministic state machine, so they produce identical states and outputs.
- No-op command
- A special command that leaves the state unchanged. A new leader proposes it to fill gaps in the command sequence.
- Stable storage
- Storage that survives failures. Acceptors use it to remember promises and accepted proposals across restarts.
What to pay attention to
- How each requirement (P1, P2, P2a, P2b, P2c) is strengthened from the previous one and which failure scenario forces each change (PDF pages 5–7).
- Why the proposer extracts a promise from acceptors rather than trying to predict future acceptances (PDF page 7).
- Exactly what an acceptor must remember on stable storage, and why it must survive restarts (PDF pages 8 and 11).
- The rule for choosing the value in phase 2: take the value of the highest-numbered accepted proposal reported, otherwise any value (PDF page 9).
- The dueling-proposers scenario and why safety still holds even when progress fails (PDF page 10).
- How a new leader handles gaps in the command sequence using no-op commands, and why phase 1 can be run for infinitely many instances with one short message (PDF pages 12–13).
Questions to keep in mind
- Why does requiring that any two majorities overlap guarantee that at most one value can be chosen?
- What goes wrong if an acceptor is required to accept the first proposal it receives and can never accept another?
- Why is it enough for a proposer to learn about the highest-numbered accepted proposal from just one majority of acceptors?
- Which parts of the algorithm affect only performance or progress, and which are essential for safety?
- How does treating the server set as part of the state machine state enable reconfiguration?
Paxos quiz: check your understanding
1. What are the three safety requirements for consensus stated in the paper?
Show the answer
Only a value that has been proposed may be chosen; only a single value is chosen; and a process never learns that a value has been chosen unless it actually has been.
2. What two things does an acceptor return when it responds to a prepare request numbered n?
Show the answer
A promise never again to accept a proposal numbered less than n, and the proposal with the highest number less than n that it has accepted, if any.
3. In phase 2, which value must the proposer put in its accept request?
Show the answer
The value of the highest-numbered proposal among the responses from the majority, or any value of its choosing if none of the responders reported an accepted proposal.
4. What information must an acceptor keep on stable storage, given the paper's optimization?
Show the answer
Only the highest-numbered proposal it has ever accepted and the number of the highest-numbered prepare request to which it has responded. It must record its intended response in stable storage before sending it, so this survives failure and restart.
5. How can two proposers prevent any value from ever being chosen, and what does the paper propose to fix this?
Show the answer
They can alternately complete phase 1 with ever-higher numbers, causing each other's phase 2 accept requests to be ignored. To guarantee progress, a single distinguished proposer (leader) should be the only one issuing proposals. Electing it reliably requires randomness or real time such as timeouts, but safety holds whether or not the election succeeds.
6. How does the paper guarantee that different proposers never use the same proposal number?
Show the answer
Different proposers choose numbers from disjoint sets. Each proposer remembers in stable storage the highest-numbered proposal it has tried to issue, and starts phase 1 with a higher number.
7. Why does a new leader propose no-op commands for some instances?
Show the answer
If it knows later commands but some earlier instances have no chosen command, it cannot execute those later commands. It fills the gap immediately by having a special no-op command, which leaves the state unchanged, chosen for those instances.
8. Why is the cost of a state machine command in normal operation essentially only phase 2?
Show the answer
A leader runs phase 1 once for all future instances, using one proposal number and a single short message. Leader changes should be rare, so each new command needs only phase 2. The paper cites prior work showing phase 2 has the minimum possible cost for agreement in the presence of faults.
Go a little deeper
The paper claims the consensus algorithm follows almost unavoidably from its requirements. Trace the chain from P2 to P2c: at which step is a design choice made rather than forced, and could a different choice lead to a different but still correct algorithm?
Read next
More papers on Consensus.
Related reading lists
Cite Paxos
Lamport, L. (2001). Paxos Made Simple. ACM SIGACT News.
@inproceedings{lamport2001paxos,
title = {{Paxos Made Simple}},
author = {Leslie Lamport},
year = {2001},
booktitle = {ACM SIGACT News},
url = {https://lamport.azurewebsites.net/pubs/paxos-simple.pdf}
}Study Paxos in ReadingTrack
Add the paper to your ReadingTrack library with its authors, venue and year, and get this page’s quiz as suggested review cards. You choose which cards to keep; nothing enters your reviews until you accept it.