Distributed Consensus Theory

A replicated state machine needs each committed command to occupy the same log position at every replica. Quorum intersection supports that guarantee only together with rules for adopting earlier decisions.

Source
Anbloq
Language
English
Created
Updated
Chapters
3
Reading time
2 min
In this article3 chapters
  1. Quorums preserve evidence across leaders
  2. A replicated log needs an additional ordering invariant
  3. Progress depends on the environment

Quorums preserve evidence across leaders

With \(n=2f+1\) crash-stop replicas, use majority quorums of size \(q=f+1\). Two majorities intersect because

\[ |Q_1\cap Q_2|\ge 2q-n=1. \]

The overlapping replica can carry evidence from one round into a later one. Intersection alone is insufficient. In Paxos, an acceptor promises to ignore lower-numbered proposals and reports what it previously accepted. A new proposer that sees accepted values in its prepare quorum adopts the value at the highest reported accepted proposal number. An induction on proposal numbers uses intersection and that adoption rule to preserve any already chosen value.

Consensus safety and termination give separate claims about completed decisions and eventual progress. Quorum intersection supplies the shared evidence, and a replicated state machine turns its ordered log into application state.

A replicated log needs an additional ordering invariant

A state-machine log turns agreement on entries into agreement on command order. In Raft, log matching connects entries with the same index and term to matching prefixes. Elections compare the candidate’s log, and replication checks its predecessor before appending entries. The leader’s commitment rule uses majority replication of an entry from its own term. Earlier entries become committed through the prefix. Merely counting replicas for an old-term entry is not the same rule.

Progress depends on the environment

Safety concerns agreement and must survive temporary delays. Liveness needs a period in which replicas can elect a stable leader and complete the needed exchanges. A failed request can leave the client uncertain whether a command committed. State-machine specifications may therefore include deduplication of retried requests. A local read also needs an argument that it observes an appropriate committed state. Compare distributed impossibility, Byzantine fault tolerance, and linearizability testing.[1][2]

References

  1. Leslie Lamport, Paxos Made Simple ↩
  2. Diego Ongaro and John Ousterhout, In Search of an Understandable Consensus Algorithm ↩