Paxos Consensus Flow
Paxos is a family of protocols for achieving consensus in a distributed network of unreliable processors, originally described by Leslie Lamport, guaranteeing that a single value will be chosen among proposed values even if a minority of nodes fail or messages are delayed.
Paxos is a family of protocols for achieving consensus in a distributed network of unreliable processors, originally described by Leslie Lamport, guaranteeing that a single value will be chosen among proposed values even if a minority of nodes fail or messages are delayed.
The core Single-Decree Paxos protocol involves three roles: Proposers (clients initiating a value), Acceptors (the quorum that votes), and Learners (nodes that learn the chosen value). The protocol proceeds in two phases.
Phase 1 — Prepare/Promise: A proposer selects a unique proposal number n (strictly greater than any previously used) and broadcasts a Prepare(n) message to a quorum of acceptors. Each acceptor that receives Prepare(n) responds with a Promise — a guarantee not to accept any proposal numbered less than n. If the acceptor has already accepted a value under a lower proposal number, it includes that value in its Promise response.
Phase 2 — Accept/Accepted: If the proposer receives promises from a majority, it broadcasts an Accept(n, v) message. The value v is either the proposer's own proposed value (if no acceptor had previously accepted anything) or the value associated with the highest-numbered prior promise. Each acceptor that has not since promised to ignore proposals less than n accepts the value and replies Accepted(n, v). Once a majority replies Accepted, the value is chosen.
Multi-Paxos optimizes repeated consensus rounds by electing a stable leader (the Distinguished Proposer), allowing Phase 1 to be skipped for subsequent decisions as long as the leader remains stable. This is how Paxos powers systems like Google Chubby and Spanner. Compare this two-phase structure with Raft Consensus Algorithm, which makes leader election an explicit first-class concept rather than an optimization. Data Replication Strategy shows how consensus integrates into a broader replication pipeline.