Fischer, Lynch, Paterson 1985 · Lamport 1998 · Wikipedia
The consensus problem: get all non-faulty nodes to agree on a single value. The FLP impossibility result says no deterministic algorithm can guarantee consensus in an asynchronous system if even one node can crash. Paxos solves it anyway by being non-deterministic (it may not terminate, but if it does, it is correct).
The consensus problem
Each node proposes a value. All non-faulty nodes must decide the same value (agreement). The decided value must have been proposed by some node (validity). Each node decides at most once (termination, in practice). These three properties are deceptively simple. Getting all three with crash failures is the core challenge.
Scheme
; Consensus: all nodes agree on one proposed value.; Three properties:; 1. Agreement: all decide the same value; 2. Validity: decided value was proposed; 3. Termination: eventually everyone decides
(define proposals (list "A""B""A"))
; Naive approach: pick the majority
(define (count-votes val proposals)
(length (filter (lambda (p) (equal? p val)) proposals)))
(define (majority-vote proposals)
(let ((a-count (count-votes "A" proposals))
(b-count (count-votes "B" proposals)))
(if (> a-count b-count) "A""B")))
(display "Proposals: ") (display proposals) (newline)
(display "Majority vote: ") (display (majority-vote proposals)) (newline)
; Works when everyone can see all proposals.; Breaks when messages are lost or delayed.
(display "Problem: what if node 3 crashes before sending?")
FLP impossibility
Fischer, Lynch, and Paterson proved in 1985 that no deterministic consensus protocol can guarantee both safety (agreement + validity) and liveness (termination) in an asynchronous system where even one process can crash. The proof constructs an execution where the algorithm is always one step away from deciding but never does. This is not a practical obstacle. It means you need randomization, timeouts, or partial synchrony assumptions.
Paxos overview
Paxos uses two phases. Phase 1 (prepare): the proposer picks a number n, sends prepare(n) to acceptors. Acceptors promise not to accept anything below n and return any value they already accepted. Phase 2 (accept): the proposer sends accept(n, v) where v is the highest-numbered previously accepted value, or its own if none. Acceptors accept if they have not promised a higher number. A value is chosen when a majority of acceptors accept the same proposal.