Paxos explained in plain terms means understanding how a group of computers that cannot fully trust each other, or the network between them, can still agree on a single value. The central question is how several machines, some of which may crash or fall silent, can choose the same result, and the answer is a careful exchange of proposals and promises that stops two different values from ever both being chosen.
Paxos is a consensus algorithm, a set of rules for reaching agreement in a distributed system. It was designed by Leslie Lamport, first described in 1989 and published in 1998, and it solves the problem of getting a group of machines to pick one value, such as the next entry in a log, even when some of them fail or messages are delayed.
The idea is simple, even if the details are famously subtle: no value is chosen until enough machines have promised to accept it, and those promises are made in a way that later proposals cannot overturn an earlier choice. This article explains what Paxos is, how it works, and where it is used.
Key takeaways
- Paxos is a consensus algorithm for distributed systems.
- It lets a group of machines agree on one value, even when some fail.
- Proposers suggest values, acceptors vote on them, and learners find out the result.
- A value is chosen only when a majority of acceptors has accepted it.
- Once a value is chosen, no later proposal can replace it.
What Paxos is
Paxos is an algorithm that solves consensus, the problem of getting several machines to agree on a single value. Each machine may start with a different idea of what the value should be, and some machines may crash or stop replying, yet the algorithm guarantees that all the machines that do decide will decide on the same value, and that a value will eventually be decided if enough machines stay healthy.
The algorithm gives each machine one of three roles. Proposers suggest values, acceptors vote on the proposals they receive, and learners find out which value was chosen. A single machine can play more than one role at once, and in a real system the same server often acts as proposer, acceptor, and learner at different moments.
Paxos is best understood as a voting system with strict rules about promises. An acceptor that promises to consider a proposal must not later accept an older one, which is what stops two competing values from both winning. Our guide to Raft explains a later consensus algorithm built to be easier to understand, and our guide to Consul explains a service that uses consensus to keep shared configuration consistent.
How Paxos works
Paxos runs in two phases, called prepare and accept. In the prepare phase, a proposer picks a proposal number, higher than any it has used before, and sends a prepare message to a majority of acceptors, asking them to promise not to accept any proposal with a lower number. The number acts as a timestamp, so acceptors can tell which proposal is the newest.
Each acceptor that receives a prepare message replies with a promise, but only if the proposal number is higher than any it has already promised to consider. With its promise, the acceptor also reports the highest-numbered proposal it has already accepted, if it has accepted one, together with that proposal’s value. This is how an earlier choice is carried forward, even when the proposer that made it has gone quiet.
In the accept phase, the proposer looks at the replies. If any acceptor has already accepted a value, the proposer must propose that value, not its own, because that value may already have been chosen. If no acceptor has accepted anything, the proposer is free to propose its own value. It then sends an accept message with the chosen value to a majority of acceptors.
An acceptor that receives an accept message accepts the proposal, provided it has not since promised to consider a higher-numbered proposal. When a majority of acceptors has accepted the same value, that value is chosen, and learners can be told the result. A majority is the key: any two majorities overlap by at least one acceptor, so two different values cannot both win a majority.
The algorithm does not guarantee that a value is chosen quickly, or even that progress is always made. Two proposers can keep outbidding each other with higher numbers, so that neither ever completes both phases, a situation known as livelock. In practice, systems avoid this by electing a single leader to propose, and letting others take over only if the leader fails, which keeps the algorithm moving while its safety guarantees hold.

Comparing Paxos with other consensus methods
Paxos is one of several ways to reach agreement across machines, and each suits a different need. Raft was designed to be easier to understand and to reason about, two-phase commit is simpler but blocks when a participant fails, and each approach trades simplicity against resilience in a different way.
The table below sets out the main contrasts between the leading approaches.
| Aspect | Paxos | Raft | Two-phase commit |
|---|---|---|---|
| Goal | Agreement despite failures | Agreement despite failures | Agreement on a transaction |
| Survives crashes | Yes, with a majority | Yes, with a majority | No, it can block |
| Leader | Optional, any proposer | Always one elected leader | A coordinator decides |
| Ease of understanding | Notoriously hard | Designed to be clear | Simple to follow |
| Best for | Core consensus, logs | Replicated logs, clusters | Single transactions |
The practical result is that Paxos is the right choice when proven safety matters most, Raft wins when a team must understand and maintain the algorithm itself, and two-phase commit is the choice only where a single transaction, rather than ongoing agreement, is what is needed.
Where Paxos is used
Paxos underpins the replicated logs that keep distributed databases consistent. When a database is copied across several machines, every copy must apply the same writes in the same order, and Paxos is what lets the machines agree on that order, so a client reading from any copy sees the same history.
Configuration services use Paxos to keep shared settings safe. A cluster needs one agreed version of its configuration, such as which machines are members or where a service lives, and a consensus algorithm stops two machines from holding different versions of that truth at the same time.
Cloud control planes rely on consensus to choose a leader. When several controllers could run a service, only one should be in charge at any moment, and Paxos, or an algorithm built on it, is what elects that leader and hands over cleanly when the leader fails.
Distributed locking uses Paxos to make sure only one holder owns a lock. A lock that two machines both believe they hold is worse than no lock at all, so the agreement must be exact, and consensus is the mechanism that makes the ownership single and definite.
Many modern systems use Paxos indirectly, through a library or a service built on it, rather than implementing the algorithm from scratch. Its ideas live on in the consensus layers of databases, coordination services, and cloud platforms, even where the name Paxos never appears in the documentation.
Strengths and limits
The greatest strength of Paxos is its safety guarantee. It has been studied for decades, and its proof shows that no two machines can ever decide on different values, however many crashes or delays occur, as long as a majority of acceptors stays reachable. That certainty is why it is trusted at the heart of systems where a wrong agreement would be costly.
It is also a strength that Paxos tolerates failures without a single point of failure. No one machine is essential, since any majority can choose a value, and the system keeps working while a minority of machines is down, which is the whole point of distributing a system in the first place.
The limits are real, though. Paxos is famously hard to understand and to implement correctly, its two phases add delay to every decision, and it guarantees safety but not liveness, so a badly run cluster can stall even though it never decides wrongly. That is why many teams now choose Raft, which keeps the same safety guarantees in a form that is easier to build and to debug.
Paxos checklist
- Use a proven consensus library rather than writing Paxos from scratch.
- Run an odd number of acceptors, so a majority is always clear.
- Keep proposal numbers unique and always increasing.
- Elect one leader to propose, and let others take over only on failure.
- Persist every promise and acceptance to disk before replying.
- Test what happens when a machine crashes mid-proposal.
- Test what happens when the network splits the cluster in two.
- Monitor how long decisions take, since stalls are the first sign of trouble.
- Make sure learners are told the chosen value, not left guessing.
Frequently asked questions
What is Paxos in simple terms?
Paxos is a set of rules that lets a group of computers agree on one value, even when some of them crash or stop replying. Proposers suggest values, acceptors vote, and a value is chosen only when a majority of acceptors has accepted it.
Who invented Paxos?
Leslie Lamport designed Paxos, first describing it in 1989 and publishing it in 1998. Lamport is a computer scientist known for his work on distributed systems, and Paxos remains one of his best known contributions.
What are proposers, acceptors, and learners?
Proposers suggest values for the group to agree on, acceptors vote on those proposals and keep promises about which ones they will consider, and learners find out which value was finally chosen. One machine can play more than one of these roles.
Why does Paxos need a majority?
Because any two majorities share at least one member, so two different values cannot both win a majority. That overlap is what stops the group from choosing two values at once, and it is why Paxos keeps working while a minority of machines is down.
What is the difference between Paxos and Raft?
Both solve the same consensus problem with the same safety guarantees, but Raft was designed to be easier to understand, with a single elected leader and a simpler log. Paxos is older and more general, while Raft is the version most teams now choose to implement.
When should I not use Paxos directly?
When a proven library or service already provides consensus, when the team must understand and debug the algorithm itself, or when a simpler agreement mechanism fits the problem. Most systems use Paxos through a library, not by implementing it from scratch.
The bottom line
Paxos explained in one line is this: a value is chosen only when a majority of machines has promised to accept it, and those promises make the choice final.
It is the algorithm that makes distributed agreement trustworthy, and it remains the foundation of the consensus layers that keep databases, clusters, and cloud services in step.
This article is general information about how Paxos works, not advice about choosing a consensus algorithm for a particular system.







