- rtshkmr's digital garden/
- Posts/
- Series/
- š« Songs of the OCaml Compiler: The Series/
- š« Addendum: Consensus & More/
š« Addendum: Consensus & More
Table of Contents
Paxos is used as a learning substrate Paxos is hard to understand and harder to implement right. This project keeps the scope to single-decree Paxos ā narrow enough to be tractable (~2 weeks) and deterministic enough to verify cleanly. in this series. This addendum hosts my observations and intuitions on some core concepts revolving around this space that may help fast-track other learners. It also aims to funnel readers to actual canonical work that others have done.

Foundations #
Why Consensus Matters #
A decision made by a single machine is lost if that machine fails. Consider a system with multiple machines that collaborate across a network to make decisions and progress towards a goal. The machines may fail but the decisions that the system makes must survive that loss. That’s the key idea behind Distributed Consensus1.
Quorums Are About Intersecting-Sets #
For a cluster of nodes to make decisions, they would have to agree on the same truth. The set Itās āsetā because the membership is what matters and not just the count. of participating nodes needed to decide on common truths is a quorum.
Any two sets that must not disagree with each other have to share a member, so if we don’t know which pairs (of sets) must not disagree, then it’s easier to make every pair overlap. That’s why a majority quorum rule is a convenient way to guarantee safety — that two quorums share at least one node so that the system does not forget a decision. Single-decree Paxos follows this instinct.
Imagine that a leaderless cluster of 5 nodes makes a decision and then one of the nodes has to discover what that decision was. Let’s hand-wave how this happens, just that "decided" For the example below, the entire caravan (with multiple caravan formations) makes a decision when enough parchments carry that information. No caravan formation can see āenoughā parchments ā it may only see what its own parchment says and dispatch couriers to get information from others. What is true of the system and what a participant observes may have a gap, thatās why we need to get intersecting sets. is a property of a set of durable records For the example below, the parchment that the caravan formations use is the durable record. Parchment is private and durable. For the example, writing the campsite on the parchment doesnāt mean that the caravan formation believes the group has agreed. Instead, it just means that this caravan formation will never write a different campsite. . Every node only knows its own state and none of the others. Though, it may send messages to the others to obtain that information.
To narrate Figure 2 , one of the caravan formations (e.g. A) has suggested to “camp @ the northern oasis”. Couriers from A ride out to all the others. We’ll call the set of formations that received the message and successfully wrote it to their own parchment, \(Q_{W}\).
in Case A and Case B, a sandstorm happens and separates them into two groups \(\{A, B\}\) and \(\{C, D, E\}\). So the couriers don’t reach
C,DandEto pass the message. OnlyAandBhave written Yes,Awill write on its own parchment paper. Implementation-wise, itās easier to write code with common code-paths so we āself-loopā and allowAto send a message to itself."northern oasis"to their parchments. So \(Q_{W} = \{A, B\}\).in Case C, the sandstorm partitions the group differently. In addition to
AandB, nodeCalso manages to write the info to its parchment. The couriers don’t reachDandE. \(Q_{W} = \{A, B, C\}\)
Later, one of the formations wishes to know where the group is headed, so it asks everyone. \(Q_{A}\) is the set of nodes that respond.
The figure below is drawn from the Chronicler’s point-of-view (us readers / the simulator), no caravan formation (node) sees the entirety of the drawn panels in the diagram.
Mapping definitions to the Tuareg canon
| Narrative term (canon) | System term | |
|---|---|---|
| Caravan formation | participant / node | member of a set |
| Parchment | private durable record | the only place a decision persists |
| Courier on a dromedary | message | the only way to learn information about another caravan |
| Collapsed messenger | node unreachable | why some caravans can’t be reached |
| Sandstorm | network partition | why the reachable set changes over time |
| Chronicler | observer outside the system | sees all five parchments; no caravan does |
| Case | Observation | Heuristic | Intersection |
|---|---|---|---|
| A: No Guarantee — write set of 2, ask set of 3 | \(Q_{A} = \{ C, D, E\}\) and \(Q_{W}\) don’t overlap, the two legal sets miss each other. Under a rule of 3 responses, the asker stops the moment C, D and E answer. The asker gets a false-negative and is licensed to contradict a decision that has already happened. \(\lvert Q_{W}\rvert + \lvert Q_{A}\rvert = 2 + 3 = 5 \ngtr N\) | If the sets merely failed to overlap and the system noticed, it would stall. That’s survivable because it would be a liveness problem. Actually, in this case, the asker won’t notice: it gets an honest, confident, wrong answer which risks creating a safety violation that can’t be recovered from. | \(Q_{W} \cap Q_{A} = \emptyset\) |
| B: Asymmetric Case — overlap is forced from write set of 2, ask set of 4 | Under a rule of 4, \(B\) is in the ask-set. \(Q_{A} = \{ B, C, D, E\}\), so \(B\) wrote the campsite AND was asked. Group is heading to northern oasis. \(Q_{W}\) and \(Q_{A}\) are asymmetric, i.e. have different sizes. \(\lvert Q_{W}\rvert + \lvert Q_{A}\rvert = 2 + 4 = 6 \gt N\) | The rule \(\lvert Q_{W}\rvert + \lvert Q_{A}\rvert \gt N\) guarantees overlap without either set being a majority. | \(Q_{W} \cap Q_{A} = \{B\}\) |
| C: Majority Case — Overlap is guaranteed from write set of 3, ask set of 3 | Here, \(Q_{W}\) and \(Q_{A}\) have the same size (are symmetric) and for \(N\), the number of formations, \(\lvert Q_{W}\rvert + \lvert Q_{A}\rvert = 3 + 3 = 6 \gt N\) . By pigeonhole principle, there MUST be an intersecting node. | If we use the majority rule, then we definitely have an answer. With a majority everywhere, no one needs to record which formations wrote anything. Any majority meets any other majority so this rule needs no book-keeping. | \(Q_{W} \cap Q_{A}= \{C\}\) |
When reading the original Paxos paperĀ 2, the narrative uses a quorum of parliamentarians and the ballots they cast. So, I was primed with the thinking that “quorum = enough votes to act”. The parliamentary setting actually has the counting-framing codified within a bookĀ 3. On further understanding, the protocol actually depends on more general point: a quorum is enough witnesses that no conflicting decision could have happened without at least one of them knowing about it.
I consider Takeaway 1 to be essential for learning Consensus Algorithms because it suggests that there are knobs within these formalised algorithms. Turning them can yield specialised variants of these algorithms for specific, practical use-cases. For example, the knob of relaxing the majority rule constraint is a stepping stone towards FlexPaxos. We could deviate from our leaderless implementation in v0 and consider leader-based approaches as another knob for us to turn.
The Knob Table: Paxos Variants as Points in a Design-Space #
My framing is that the named algorithms are the same core with different knobs turned. My v0’s Single-decree Paxos is the outcome of setting all the knobs conservatively, to prioritise safety:
- no leader
- single decision — single decree
- it’s 2-phased and both phases run every time
- always follows majority-quorum rule
Each of the Paxos-variants below relaxes one of those settings and absorbs the cost in some other way. The trade-offs are easier to see if we read the settings as axes within a design space instead of a list. Happily, this also lets us ask the important question: which of these settings does my workload / use-case really need?
Six Knobs #
These are roughly in the order that the series encounters them.
The quorum rule
Which pairs of sets must overlap, and how large each must be. This is the main point I made in the previous section about quorums. Majority-everywhere is the setting that declines to distinguish the pairs.
Scope: single-decree or log of decisions?
Is the system deciding one thing (single-decree), or a sequence of things? Paxos decides one value, immutably, forever. Almost every real system wants an ordered log of decisions, which means running multiple instances of the core protocol.
Leadership
Is any node a distinguished proposer, or may anyone propose? A leader is not required for safety — v0 has none. It exists to improve latency and to reduce contention. It may also simplify implementations.
Phase elision
Must the first phase run before every decision, or can it run once and amortised across multiple decisions? This knob only becomes available once knobs 2 and 3 are turned.
The message path.
Does a proposal travel through client \(\Rightarrow\) coordinator \(\Rightarrow\) acceptors, or can the client reach the acceptors directly? Removing the hop removes a message delay and creates the possibility of collisions.
Ordering discipline.
Must every decision be totally ordered against every other, or only against those that actually conflict?
The Table of Knobs #
| Variant | Knob(s) turned | Benefits | Costs |
|---|---|---|---|
| Single-decree Paxos2 | This is the baseline | Prioritises unconditional safety; no special roles; nothing to elect | two phases per decision; duelling proposers can prevent progress indefinitely (livelocking4) |
| Multi-Paxos4 | scope \(\Rightarrow\) a sequence; leadership \(\Rightarrow\) one distinguished proposer; phase 1 \(\Rightarrow\) elided | one round trip per decision in the steady state | leader election; on handover the new leader must reconcile slots left half-decided5 |
| Flexible Paxos 6 , 7 | quorum rule \(\Rightarrow\) only \(Q_{1} \cap Q_{2}\) invariant required, sizes free | practical tuning of systems: small accept quorums; faster and more failure-tolerant steady state | leader election needs a larger quorum, so recovery is less available when it is needed |
| Fast Paxos8 | message path \(\Rightarrow\) clients reach acceptors directly, coordinator elided on the fast path | one fewer message delay from client to learner | fast quorums must be larger than a majority; concurrent proposals collide and fall back to a classic round |
| Raft :— not a paxos variant9 , 10 | leadership \(\Rightarrow\) restricted; scope \(\Rightarrow\) a single contiguous log | one mechanism, understandable end to end; no per-slot reconciliation | leadership is available to fewer nodes; the log admits no holes, so one lagging follower delays nothing but one slow leader delays everything |
| EPaxos (Egalitarian)11 | ordering discipline \(\Rightarrow\) order only conflicting decisions | commuting operations commit concurrently; no single ordering bottleneck | conflict detection and dependency tracking; recovery is substantially more intricate |
That’s why I’m framing it as a “design space” rather than a catalogue of algorithms. None of them are without trade-offs / assumptions that may not hold depending on the conditions of where the algorithm is deployed.
Essence of the Algos #
Here are some points that I’ve picked up from implementing / reading on how variants are implemented.
Some correctness pointers to consider based on some initial misconceptions I had:
Multi-Paxos elides Phase 1 (leader election) per leader term across all slots, instead of for every decision.
I think my misconception stemmed from the fact that leader election is discussed first in the paper, so it’s easy to conflate that it’s per-decision.
Fast Paxos’ fast-quorum is bigger than a majority-rule to make recovery feasible so that progress is ensured. See the 3-way set intersections within the Fast-paxos paperĀ 8
Flex-Paxos’ quorum is asymmetric when comparing phase 1 vs phase 2, not across two of the same phases.
Multi-Paxos: run leader-election once per-term instead of per-decision
So, when running multiple rounds, the elision of the leader-election step is important. A leader runs phase 1 once, with a single proposal number, and that phase 1 covers all future slots rather than the next one.
Each subsequent decision within that term costs a single round-trip: leader sends accept, a quorum replies, the value is chosen.
Leadership transfer is interesting because it has a cost. The moment a leadership transfer happens, all the work that phase 1 was skipping is due at once at that point. This is because when a leader runs its phase 1, the acceptors will report back any values that they’ve already accepted and the leader can’t tell which have been chosen and which haven’t.
The leader therefore chooses to re-propose every value that it hears and if there’s gap, the leader shims it with a noop. Only after that can the new leader start proposing new values.
Fast-Paxos: we bet on low-contention and omit a hop; but we also pay for it
This improves upon Multi-Paxos by shortcutting the path that a message takes.
Multi-Paxos: client \(\Rightarrow\) leader, leader \(\Rightarrow\) acceptors, acceptors \(\Rightarrow\) learner (3-hops after client is when the learner receives it)
Fast paxos shortcut: client\(\Rightarrow\) acceptors, acceptors \(\Rightarrow\) learner
The price is in the quorum arithmetic. Recovery must be able to determine which value could have been chosen when two clients proposed concurrently into the same round, which requires a classic quorum to intersect two fast quorums at once.
With majority classic quorums this forces fast quorums larger than three quarters of the cluster:
- 4 of 5, rather than 3 of 5.
In a three-node cluster the fast quorum is all three, so the fast path tolerates no failures at all. This knob wants a larger cluster than the others.
And when two clients do propose at once (competing), acceptors may accept different values in the same round. That is a collision, and it is resolved by falling back to a classic round, which costs more than it saved.
Fast Paxos is a bet on low contention.
Flex-Paxos: need to correctly choose which pairs of quorums to overlap
Given the framing that majority-rule is overly conservative and can be relaxed, that intuition is formalised in Flex Paxos.
So, if we had 5 acceptors, accept-quorums of size 2 elect-quorums of size 4 still follow \(4 + 2 > 5\) and guarantee safety.
Leader-failure becomes costlier. To do this, we need to reach a quorum of size 4 / 5.
So the trade is between good steady-state write-latency in exchange for worse availability during recovery (from the asymmetric quorums). Which to choose depends on how often we can expect leadership changes to happen.
Signposts #
| Source | Good for… |
|---|---|
| “The Part-Time Parliament” (1998, Lamport) 2 | understanding the beginning — the original paper |
| “Paxos Made Simple” (2001, Lamport) 4 | following up from 2, the original algorithm, without the parliament focus; also covers multi-paxos |
| “Paxos Made Live” (2007, Chandra et al.) 5 | filling the gap between the paper (academic, theoretical) and a running system — it’s from the perspective of seasoned implementers |
| “Impossibility of Distributed Consensus with One Faulty Process” — the FLP paper12 | understanding why liveness cannot be guaranteed and must be engineered around. (It’s because we can’t distinguish a crashed process from a slow one in an async system) |
| “Viewstamped Replication” (1988, Oki & Liskov)13 | approaching the same distributed consensus problem solved independently, from the replication side |
| “Flexible Paxos: Quorum Intersection Revisited”/ (2016, Howard, Malkhi, Spiegelman) 6 | seeing a formalised approach to turning the quorum knob |
| “Paxos vs Raft: Have we reached consensus on distributed consensus?” (2020, Howard & Mortier)14 | comparing and contrasting the two and seeing how close they are |
| “A Generalised Solution to Distributed Consensus” (2019, Howard, Mortier)15 | generalising the paxos variants by turning knobs such as the majority rule replaced by an arbitrary intersection rule |
| “Generalized Consensus” (2025, Sougoumarane)16 | seeing how the generalisation in 15 and a ground-up framing of rules carries into a system currently being built (Multigres) |
Addendum to the addendum: the sections above were feedback-driven, to fill a depth-gap on the fundamentals.
I read the “Generalized Consensus” series recently, and I believe that it’s an important re-frame A buddy of mine needs to add a consensus layer to his product spoon in his road-map (shout-out to paperland) and Iād encourage him to read the generalised framework first before studying the algorithms that are typically implemented as black-boxes (in this case, his need for state-machine replication might make him abandon a log, so a variant like caspaxos may likely fit). of approaching distributed consensus using fundamental, goal-oriented rules. I had to update the “Songs of the OCaml” series to include some ideas from there.
The sections below are my thoughts on reading that series; they remain focused on my goals for this addendum.
Towards Generalised Consensus #
The “Generalized Consensus” series16 builds its framework from the ground up: a small set of hierarchical, goal-oriented rules first, with the familiar named algorithms arriving later as things that happen to satisfy them.
A Trailer to “Generalized Consensus” #
The series16 opens by re-framing distributed consensus as a matter of distributed durability rather than being about agreement between agents in a cluster. It says that agreement is actually the mechanism to solve the problem of distributed durability and that prior art has mainly focused on mechanisms — the way that particular algorithms operate — rather than what the system should deliver (requirements focused on the problems). Through that frame, quorum intersection becomes a property to make a saved decision findable again. It shows Durability and Discoverability as two sides of one coin. A rule that makes data durable without keeping it discoverable can still stall the system ā which is just as bad as losing the data because the availability requirement fails either way.
If durability is the requirement, then instead of being a law to follow, durability rules are parameters to inject. Just like the earlier metaphor of knobs in a design-space, we are free to relax conservative rules (e.g. Majority-quorum) and may conjure up durability policies that fit the shape of modern use-cases on modern infrastructure. In a classic Dependency Injection move, the focus then shifts to durability policies that are pluggable… so long as a few custodial restrictions
These make the system predictable: a rule may only depend on the current set of participating nodes, node properties (e.g. availability zone) must be static, and no external variables may be depended on.
are met. A fundamental observation follows: different leaders may hold different rules at the same time. This heterogeneity is what turns the job from a configuration option into a systems problem — a ruleset is now a decision in its own right and it’s replicated state that whoever takes over next has to discover and reconcile before it can act.
We learn that there’s a paper (“A Generalised Solution to Distributed Consensusā15) that is similarly-named but the two actually aim to do different things The two works do overlap when discussing the concepts of revocation and flexible durability rules. . The paper works on demonstrating a single algorithm that is general enough for the named protocols to show themselves as its instances while the blog-series establishes a general framework for adapting a consensus system to the environment that it has to run in.
Spoilers: The framework’s governing rules that make this treatise tractable
The series makes it clear that it’s providing a framework for a generalised approach and not dictating an implementation approach.
It defines 2 rules17 that govern the correctness of the framework to maintain its safety guarantees. I’ve transcribed Iāve taken minor liberties to editorialise this, the original phrasing is here them here.
These numbered rules are hierarchical: satisfy a parent rule and you needn’t follow its sub-parts:
Durability Rule
A distributed decision must be made durable
A decision that is durable can be applied
Consistency Rule
Revocation: every agent must revoke all previous agents’ ability to make further progress before taking any action.
So, every agent must also give a way for future agents to revoke its ability to make progress
Rediscovery and Repeating: every agent must be able to discover decisions that have been made durable but haven’t been applied yet. Upon discovering:
Honouring: If it’s not possible to know if a decision has met the durability criteria, the agent must honour it because it may have been applied
- honoured decisions must be made durable by the current agent
Inference: if there’s conflicting timelines , the newest one must be chosen
The magic of this series is in how it layers fresh constraints/concepts in a way that they naturally reduce to an earlier point that it would have established. The rules in the early parts are what the later ones obey — the 11-parts should be read in order for them to have a satisfactory, snap-together feel.

A Conceptual Keystone: Why Revocation Is a Primitive #
Reading “Generalized Consensus”Ā 16 with an implementation already written is a different experience from reading it cold. v0 is a deterministic, single-decree Paxos simulator. It’s small enough that the OCaml type system is the primary subject and Paxos the learning substrate — and small enough that revocation never came up. “Generalized Consensus” makes revocation a rule and shows how other concepts reduce to it. The implementation it suggests fuses revocation back into the steps around it, and that fusion of mechanisms is where I would have gotten it wrong.
Revocation Is Not Only a Lock-Out #
Rule 2a in “Generalized Consensus”16 opens by asking one thing of an agent
The seriesā generic term for whoever is currently entitled to make a decision on the clusterās behalf. In a leader-based system there are at least two kinds: the leader, which fulfils requests, and the coordinator, which changes leadership.
before it may take any action: revoke every previous agent’s ability to make further progress. Read quickly, this revocation rule sounds like clearing the desk before starting work — housekeeping.
Read past the prohibition and the same rule is an act of discovery: stated as what an agent must stop, it also fixes what the agent finds. This second reading is the one I arrived at late.
The foundations above and “Generalized Consensus” start from the same premise: a quorum is a set of nodes, and majority is convenient rather than necessary. That’s Takeaway 1 and their shared upstream is FlexPaxos The writer of the āGeneralized Consensusā series16, Sugu Sougoumarane, published his own account of the same relaxation in 20167, cited in the knob-table. Ā 6, cited in both. Mine stops there. I treated intersection as a safety property: something that stops the asker Itās a term I used for an example above about quorums being set intersections. from contradicting a decision that already happened (Case A is the counter-example). That reading turned Takeaway 1 into a question about which design-knob yields which protocol-variant: a question about algorithms, asked from inside them. The series declines that reading rather than reinterpreting it — ‘intersecting quorums’ appears in its list of terms it will not use, replaced by discovery, revocation and candidacy.
Three observations on the framework’s rules:
The sweep that stops the incumbent is what produces the discovery of state, and what it finds determines which requests get honoured after a failure. To stop the incumbent, the revoking set must contain a node from every combination the incumbent could have made a request durable with. A set that hits every such combination has also seen every request that reached one — and some of the merely-attempted ones.
Which nodes belong in the revoking set is a separate question from who is taking over (i.e. the
candidate). Paxos and Raft ask for a majority, and a majority Specifically,preparemessage for Paxos,RequestForVotefor Raft. satisfiesrevocationandcandidacyat once, so the two never appear as separate requirements. Relax the quorum rule and they need not be the same nodes.How far the revoking set has to reach isn’t set by the incumbent either. A
coordinatorAnagentthat sits outside thecohort. It health-checks the nodes and, when it concludes thereās a failure, appoints a new leader. Severalcoordinatorscan be deployed ā placed across availability zones ā and they arenāt aware of each other. They may overlap in their purview too. must revoke every leadership therulesetThe durability policy made concrete: the list ofcohortnodes, which of them are eligible to lead, and for each of those, the node combinations that count as durable. Every cohort node stores it. permits — not just the one it thinks is currently leading. Each of those primaries has to be left unable to complete a request, either byrecruit-ing Asking a node to move up to yourtermnumber. It accepts only if yours is higher. You donāt have to say why ā what the nodes get used for is decided afterwards. it directly or by denying it every combination of nodes it could complete with. Under majority-everywhere a single majority discharges that for all of them at once; onceleadersA leader is a node in thecohortcurrently empowered to accept requests and make them durable. It serves until its leadership is revoked; thereās no expiry. The series also calls these primaries when listing which nodes are eligible. hold different rules, each has to be accounted for separately. That is what makes a heterogeneous ruleset safe: a write need only reach any leader’s quorum, and recovery finds the alternates.
None of the three is dimensioned by what the new agent intends to do. Something that self-contained looks like it should be folded into the mechanisms it serves — into discovery, into candidacy, into the ruleset change itself.
In this framework, it nearly is. A coordinator achieves all four
Part 11 verbatim: āA single step achieves the above four goals: The coordinator increments its current term number and sends a message to recruit all the nodes in the cohort.ā
in one step: it increments its term and sends a single recruitment message to the cohort
The full set of nodes responsible for meeting the systemās durability requirements ā the ones that persist logs. Coordinators are not part of it.
, and revocation, candidacy and discovery arrive as goals of that one step rather than three steps of their own. Recruitment doesn’t even distinguish revocation from candidacy — the same message that revokes is the message that recruits a candidate.
The node a coordinator intends to install as the next leader. It becomes the leader when the coordinator delegates its term to it.
And yet the three sit differently in the rules. Candidacy never appears as a rule at all. Revocation of candidacy and revocation of leadership are the same act, and that is not a coincidence: revocation works by disrupting durability, and the only durability rules in the system apply to leaderships. Discovery has a rule of its own, but the mechanism that satisfies it is what the series calls a 'serendipitous side effect' The writerās words, not mine. of revocation. Revocation alone is a rule with nothing that it can further reduce to.
The Entry Price for Manufactured Authority #
What breaks is our intuition on the costs of revocation.
Suppose we fuse the concepts: revocation becomes a step inside a procedure — e.g. something a leadership change does — so its cost must belong to that operation.
It doesn’t, though. Authority is a quantity distributed across the cohort’s persisted term
āGeneralized Consensusā adopts Raftās terminology. term is Raftās name for the number that orders decisions; Paxos calls it a proposal number. Every node persists the term it last agreed to, rejects requests from any lower term, and can be recruited into a higher one.
numbers, not a property that an agent holds. A term number means nothing until nodes have been recruited into it. Acquiring authority and draining it from the incumbent are one act seen from two ends
Authority accumulating on the coordinatorās side, the ability to reach a quorum draining on the incumbentās side
, rather than being two steps in sequence. Revocation can’t be folded into discovery or candidacy because it’s not a precondition of those steps; they are things that revocation does.
Revocation is achieved by recruiting nodes into a higher term, and there are two routes:
recruit the incumbent directly, so that it relinquishes leadership and it waits for further requests
recruit the nodes that the incumbent relies on for durability, so that those nodes stop accepting its requests — like a mutiny
Both routes are recruitment; neither is a separate revoking instruction.
If revocation is part of what a leadership change is, then a leadership change must be disruptive — the incumbent stops being able to complete requests, and writes stall until a successor is established. There’s no version of it that skips the revoking.
The framework shows otherwise. A planned leadership change is handed to the current leader as a request it fulfils like any other, with the quorum for that sole request widened to include the intended leader’s rules. Once applied
Irreversible commitment of a decision ā e.g. a commit for a database, an fsync for a filesystem. Only safe once the decision can no longer be abandoned.
, the leader steps down and the successor observes the event and promotes itself, and no new term is started
Part 8 verbatim on planned leadership change: āAgain, there is no need to start a new term number for this method.ā
. This leader-method is possible because the leader already holds what a coordinator would have had to manufacture, so there’s no second writer to lock-out. This is not some special case of cleverness. There’s no need for a new term, so there’s nothing to recruit which means nothing to revoke. It’s the same operation, just that the router varies
The agent that actually brings in the change. Here, instead of being the coordinator, itās the leader itself.
.
coordinator having no authority of its own. Why can’t it have some?A Coordinator Is Not a Supervisor #
A process that watches a set of nodes, health-checks them, decides if one of them has failed, and installs a replacement is a strikingly familiar shape. In some systems, such an entity does hold authority of its own as a supervisor. That’s the mental model that I initially had for the coordinator, carried over from OTP18 supervision trees. A coordinator connects to every node in the cohort, keeps its picture of the current leader, term and ruleset up to date, and walks a decision-tree that ends with one of two actions: change the leader, or do nothing.
A supervisor’s authority is structural — it never acquires it at the moment it acts; it already has it because of how the system was built. It spawns its children, holds links to them, and the parent-child relationships exist before any failure does. A supervision tree makes parenthood exclusive by construction, so a supervisor never has to consider whether some second supervisor is restarting the same child at the same moment.
A coordinator, as described in the framework, has none of that. It doesn’t create the leader, it doesn’t own the log. Any authority it has, it has to go and acquire — and the only instrument for that is a term number.
A supervisor is a lock with a process-tree around it. The series considers such a lock and sets it aside because a lock can’t carry a proof. We can’t bound how long a process takes, so a timeout can elapse mid-action; and clocks drift, so an agent can believe it still holds time everyone else considers expired. Either way, a second agent starts acting, and sequentiality is violated. Part 5 gives both reasons in its detour on distributed locks.
So, even though exclusivity is available, it’s not provable, and the term number machinery is what gets built instead. The “Generalized Consensus” series is careful, rather than dismissive, about this distinction. It keeps locks and timeouts viable as long as the trade-offs are understood, and notes that Vitess runs this way
Part 5: āWe shouldnāt dismiss this approach⦠In fact, Vitess employs this approach.ā
.
An agent that cannot prove it is alone has to assume that it is being raced. And because a crashed coordinator is indistinguishable
Per the FLP resultĀ 12, which the series cites for exactly this.
from a slow one, it has to assume it will never find out. That is why the scope for revocation is every leadership the ruleset permits, not just the incumbent’s.
An arch is the picture I keep coming back to. Its keystone is not a separate kind of stone — it’s cut and set in the same course as the stones beside it, doing the same job they do.

Looking Forward #
Earlier, I said that the fusion is where I would have gotten it wrong. v0’s scope also let the quorum-checks use the convenient, number-based approach — majority-everywhere makes a count sufficient — even though Takeaway 1 had just argued that a quorum is a set and size is merely a property of it.
| |
A quorum typed as a count can’t express node-identity rules — which combinations of nodes qualify — and combinations are exactly what a revoking set has to hit. The count isn’t confined to one signature either; it’s threaded through the helpers beneath it. Changing that will be v1’s problem. Knowing that now, before v1 exists, is most of what reading the series bought me.
There’s still something that I can’t yet judge:
coordinators race for the same term? A majority rule guarantees one of them fails and Part 10 says the recruitment options always overlap. I can’t yet see what makes a heterogeneous ruleset owe me that.I expect to find out when I write v1. Preferably not as a hobby.
The book, “Designing Data-Intensive Applications” is a classic read that goes through the basics. I have some rough notes on the 1st edition’s Chapter 9 (Consistency and Consensus) here. The latest (2nd) edition released in February 2026, I’ve skimmed through it but notes aren’t updated yet. ↩︎
The legendary Leslie Lamport laid the foundations for managing chaos in distributed systems. The Paxos algorithm was published in the 90’s as “The Part-Time Parliament”, which built on his earlier work around the space. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
“Robert’s Rules of Order”, a manual of parliamentary procedure – the Wikipage for “Quorum” relies on this too. ↩︎
Leslie Lamport, “Paxos Made Simple” (2001), introduces the multi-decree extension and also walks through how two duelling proposers may livelock the system. It’s funny because in his writings on his blog he mentions that he had to write this paper because the original one2 was too difficult for students to understand. ↩︎ ↩︎ ↩︎
“Paxos Made Live: An Engineering Perspective” (2007): This is a Google-paper on the real-world experience implementing Multi-Paxos in databases. I’ve done a shallow-read of this implementation-focused paper, so there’s much more to internalise from it. ↩︎ ↩︎
“Flexible Paxos: Quorum Intersection Revisited” (2016, Heidi Howard, Dahlia Malkhi, and Alexander Spiegelman): This paper demonstrates that intersection is only required across two phases of Paxos; majority quorums are therefore sufficient but not necessary. ↩︎ ↩︎ ↩︎
“A More Flexible Paxos” (2016, – Sugu Sougoumarane): This post was written to explain a similar re-framing of intersecting quorums in the words of the co-creator of Vitess. ↩︎ ↩︎
“Fast Paxos” (2006): Leslie Lamport — a faster paxos by noticing that when there’s no contention, we can just let learning occur in 2-message delays ↩︎ ↩︎
Raft is lucky to have its own dedicated landing page, with compilation of user-generated material, papers and so on. The landing page has a nice animation to play with and understand the algorithm. ↩︎
The Raft Paper: “In Search of an Understandable Consensus Algorithm” (2014) ↩︎
Egalitarian Paxos, EPaxos, is the most fascinating to me because it’s most analogous to a democratic system. There are numerous papers on this:
- “There Is More Consensus in Egalitarian Parliaments” (2013) is the original paper
- There’s a follow-up proof-of-correctness via the paper “A Proof of Correctness for Egalitarian Paxos” (2013).
- I’ve not read the following paper as deeply as the rest (especially because it’s the freshest) — “Making Democracy Work: Fixing and Simplifying Egalitarian Paxos (Extended Version)” (2025)
In 1985, Fischer, Lynch and Paterson showed that no deterministic protocol can guarantee both safety and termination in an asynchronous system where even one process may fail. Paxos resolves this by never sacrificing safety and allowing progress to stall. ↩︎ ↩︎
“Viewstamped Replication: A New Primary Copy Method to Support Highly-Available Distributed Systems” is a paper that explores how HA may be achieved by using a copying technique from the replication-side. ↩︎
The paper, “Paxos vs Raft: Have we reached consensus on distributed consensus?” (2020, Howard & Mortier) is a useful compare and contrast exercise and concludes that these are more alike than their reputation suggests. ↩︎
“A Generalised Solution to Distributed Consensus” (2019, Howard, Mortier) — a paper that generalises how the paxos variants may be implemented. ↩︎ ↩︎ ↩︎
“Generalized Consensus” is a blog series by Sugu Sougoumarane, of Vitess fame, whose team is currently building a Postgres version of Vitess, Multigres ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
The actual phrasing for the rules without my editorialising is from part 3 of the series. These rules govern how distributed systems may meet their safety guarantees. ↩︎
OTP is Erlang’s standard library and design principles, inherited by Elixir. A
supervisorstarts child processes, monitors them, and restarts them on a declared strategy. Supervisors supervise supervisors, so an application is a tree, declared up front. ↩︎