Paxos is the algorithm every distributed system either uses or replaces. It solves the fundamental problem: N nodes must agree on ONE value even if some fail.
The problem
N nodes propose values. At most one value must be chosen. Even if some crash, the chosen value must be stable.
The problem
N nodes propose values. At most one value must be chosen. Even if some crash, the chosen value must be stable.
Phase 1: Prepare
Proposer picks number n, sends Prepare(n) to acceptors. Acceptor promises to reject anything < n and returns any previously accepted value.
Phase 2: Accept
If proposer got promises from a majority, sends Accept(n, v) where v is either its own value or the highest accepted value from Phase 1.
Quorum + safety
Majority for both phases = any two majorities intersect. Guarantees at most one value is chosen.
Why Paxos is hard
Original paper (Lamport 1998) was famously incomprehensible. Multi-Paxos, Fast Paxos add optimizations. Most engineers use Raft instead.