The question this answers
Which nodes are in my cluster right now, and what am I allowed to do with that answer?
Consensus-backed membership guarantees a single totally ordered sequence of configurations: every node’s view is a prefix of that sequence, so views may be stale but never contradictory. Gossip-based membership guarantees only eventual convergence in the absence of change, and under continued churn views may disagree indefinitely. Neither guarantees that any view matches which processes are actually running.
Everything below is bought to hold this sentence. "Strongly consistent" with no scope attached is a slogan, not a guarantee — read what it actually covers, and what it explicitly does not.
A knows when it last received a message from B, and what other nodes have recently claimed about B. Both are statements about message arrival, not about B. "B is down" is always an inference, and it is the inference from which most of this domain’s worst bugs are constructed.
A node knows its own state and the messages that arrived. Everything else is inference from evidence that was already stale. "B has not replied in five seconds" is knowledge; "B is down" is a decision — and usually the bug.
Why there is no correct answer available
Membership rests entirely on failure detection, and failure detection over an asynchronous network is provably imperfect: no algorithm can distinguish a crashed process from a slow one, because both look identical — silence (No Heartbeat Does Not Mean Dead, Crashed or Just Slow: The Distinction You Cannot Make).
So "is B in the cluster?" has no observer-independent answer. A believes B is gone, C believes B is present, and B believes it is fine and is still serving requests from clients who can reach it. All three are reasoning correctly from what they observe. There is no oracle to appeal to, and building one is exactly the impossibility.
What a system can do is impose an *ordering* on beliefs, so that although nobody knows the truth, everybody eventually agrees on the same story. That is what consensus-backed membership buys: not accuracy, but agreement. A node may be wrongly evicted, but every node agrees it was evicted, at the same point in the sequence, and downstream decisions built on that sequence stay consistent with one another.
That distinction — accuracy versus agreement — is the whole of this lesson. You cannot buy accuracy. You can buy agreement, and it costs a majority.
- node B — healthy; still serving clients that can reach it
- abelieves “B has failed and should be removed”✕ and it is false
- cbelieves “B is alive but slow; keep it”✓ and it is true
- bbelieves “I am a healthy member and may accept writes”✕ and it is false
Every node above is acting on what it believes. Nothing in the cluster tells the mistaken one that it is mistaken.
The rule: separate membership-for-routing from membership-for-correctness
Almost every membership design mistake comes from using one mechanism for two purposes with very different requirements. Split them and the choice becomes obvious.
Membership for routing answers "where should I send this request?" A wrong answer costs a failed request and a retry. It may be eventually consistent, gossiped, cached and stale, because being wrong is cheap and self-correcting — the request fails, the client retries elsewhere.
Membership for correctness answers "who may act?" Who is in the quorum. Who may be leader. Who holds the lock. Who owns this partition. A wrong answer here is not a retry, it is two writers, a split brain, or a lost write. This membership must be totally ordered, and every action taken under it must carry the configuration version so that a stale actor can be recognised and refused (Fencing Tokens: Making the Stale Actor Safe, Not Just Unlikely, Terms and Epochs: Making Stale Leaders Harmless).
The failure of the naive design is precise: gossip the membership, then let quorum composition follow it. Under partition, both sides gossip themselves into a view in which they hold a majority, and both proceed (Split-Brain: Two Nodes, Both Certain They Are In Charge). No amount of tuning fixes this; only an ordered configuration change does.
The practical consequence is a hybrid, and it is what mature systems run: a small consensus group owns the authoritative configuration and changes it rarely, while gossip distributes fast, approximate liveness for routing. See Coordination Services: The Primitives, Not the Product for the first half and Gossip: Epidemic Spread Instead of Everyone Telling Everyone for the second.
| Question | Cost of being wrong | Consistency needed | Suitable mechanism |
|---|---|---|---|
| Where do I send this request?typical | A failed request and a retry | Eventual is fine | Gossip, cached registry, DNS |
| Which nodes count toward a quorum?protocol | Two disjoint quorums; divergent committed history | Total order, no exceptions | Consensus-backed configuration |
| Who is the leader?protocol | Two leaders accepting writes | Total order plus fencing at the resource | Consensus plus an epoch on every action |
| Who owns this partition?protocol | Two owners, silently divergent data | Total order for the handover event | Consensus for the flip; gossip for the routing hint |
| Is this node worth probing?typical | A wasted probe | None | Local suspicion, no sharing needed |
Joining is where the split brains are born
Failure gets the attention; joining is where the subtler bugs live.
Bootstrap split-brain. Five nodes start simultaneously. A network hiccup means nodes 1–2 see only each other and nodes 3–5 see only each other. If "form a cluster with whoever you can see" is the rule, you now have two clusters with the same name, each accepting writes, each entirely convinced it is *the* cluster. They will not merge later; their histories have diverged.
The fix is that bootstrap must be an explicit, one-time, externally-specified act: name the initial members (--initial-cluster), or require an expected size before forming, or have exactly one node bootstrap and every other node *join* an existing cluster. This is why every serious system makes first-boot awkward. The awkwardness is the safety.
Rejoining is not the same as joining. A node that restarts has lost its volatile state but may have stale durable state. If it rejoins under the same identity, old rumours about it — "B is alive at version 7" — can resurrect a stale view, and old rumours against it — "B is suspect" — can immediately re-evict a healthy process. The standard fix is an incarnation number (Cassandra calls it a generation): a counter, persisted or derived from a start timestamp, that increases on every restart. Statements about a node are tagged with the incarnation they refer to, so a rumour about incarnation 7 has no effect on incarnation 8. Without it, a flapping node produces membership chaos out of proportion to its actual behaviour.
The related mechanism is refutation: when B learns that others suspect it, it broadcasts a higher incarnation of itself, which supersedes the suspicion. This is how SWIM lets a wrongly-suspected node rescue itself in one round instead of being evicted and having to rejoin. It works precisely because it is B — the only party with direct evidence of B’s liveness — that gets to speak.
Leaving gracefully is categorically different from failing. A graceful leave is an announcement: unambiguous, immediate, requiring no inference. A failure is an inference: ambiguous, delayed, sometimes wrong. Make shutdown always announce, and the vast majority of membership events stop being guesses.
Changing the membership is more dangerous than changing the data
If membership determines quorums, then changing membership changes what a quorum *is* — and doing it carelessly breaks the overlap property that quorums depend on.
The classic hazard: move from a 3-node cluster {A,B,C} to a 5-node cluster {A,B,C,D,E} in one step. Suppose A and B adopt the new configuration while C has not. Now {A,B} is a majority of the old 3 for C’s purposes... no — more precisely, {C} plus one other can form a majority of the old configuration while {A,B,D,E} forms a majority of the new one, and the two overlap in no node that has both configurations. Two disjoint majorities exist simultaneously, and both can elect a leader. The safety property that made consensus work has been silently removed by a configuration change.
Raft offers two remedies. Single-server changes: add or remove one node at a time, which guarantees the old and new majorities always intersect. Joint consensus: a transitional configuration requiring majorities in both the old and the new set before the new one takes effect. Both work; the first is simpler and is what most implementations use, which is why growing a cluster from three to five is two operations rather than one.
The operational rule that falls out: never change more than one member at a time, and never change membership while the cluster is already degraded. Adding a replacement node during an outage feels helpful and is one of the more reliable ways to lose a quorum permanently.
Scale, and why one mechanism does not cover the range
Consensus-backed membership works well up to a few hundred nodes and is usually deployed with a much smaller quorum group than the cluster it describes — three or five members holding a configuration that names thousands. What does not scale is putting *every* node in the consensus group: every change needs a majority of them, and majority round trips over a large, wide group are slow and fragile.
Gossip-based membership scales to thousands because each node’s cost is constant — a few probes per interval regardless of cluster size (Gossip: Epidemic Spread Instead of Everyone Telling Everyone). What it gives up is exactly what the correctness case needs: ordering and agreement.
The composition that works: a small consensus group holds the authoritative configuration and the ownership assignments; gossip distributes liveness quickly to everyone; the consensus group consumes gossip as *evidence* but makes changes deliberately and slowly, with a delay before acting on suspicion. That delay is what stops the composition from becoming the feedback loop described in Rebalancing: A Load Spike You Schedule for Yourself.
Key points
- Membership is a belief formed from silence; no node can distinguish a crashed peer from a slow one.
- You cannot buy accuracy. You can buy agreement, and it costs a majority.
- Split the two uses: routing membership may be eventual and stale; correctness membership must be totally ordered and fenced by a version.
- Bootstrap must be explicit, or a network hiccup at startup creates two clusters with the same name.
- An incarnation number is what stops stale rumours from resurrecting or re-killing a restarted node.
- Change membership one node at a time, and never while degraded — a careless change can create two disjoint majorities.
The chain, answered
Every field here is required, which is why no lesson in this domain can recommend a design without naming what an operator sees when it fails, what survives the partition, what repairs it afterwards, and the simpler thing to consider first.
- • Each node maintains a local view: a set of members, each with a status and an incarnation number.
- • Liveness evidence arrives from direct probes, from indirect probes via peers, and from gossip about what others have observed.
- • A peer that misses probes is marked suspect rather than dead, and the suspicion is disseminated so the peer can refute it with a higher incarnation.
- • If the suspicion is not refuted within a timeout, the node is marked failed in the local view and the change is gossiped.
- • For correctness-bearing membership, the change is instead proposed to a consensus group, which commits it as a new configuration with a monotonically increasing version.
- • Every action whose validity depends on membership carries that configuration version, so a stale actor is recognised and refused rather than obeyed.
- • A slow node is declared dead and evicted while continuing to serve clients.
- • An asymmetric link means A cannot hear B while B hears A, so their views disagree permanently.
- • A partition lets both sides believe they hold a majority.
- • Two clusters form at bootstrap and never merge.
- • A restarted node is immediately re-evicted by a stale suspicion, or resurrected by a stale liveness rumour.
- • A configuration change during degradation removes the last node that could have formed a quorum.
- • Asymmetric view: a client’s request succeeds or fails depending on which node it lands on, because the nodes disagree about who is available. The operator sees an error rate that correlates with nothing in the application and is stable at a strange fraction like 30%.
- • Membership flap: a node with long GC pauses is evicted and rejoins every few minutes, and each cycle triggers a rebalance. The operator sees streaming or shuffling activity that never returns to idle and a membership event log full of one hostname.
- • Bootstrap split-brain: two clusters with the same name, each serving a subset of clients, each internally consistent. The operator sees data that exists for some users and not others, with no errors and no obvious pattern.
- • Quorum lost by configuration change: a membership change is committed by the old majority and the new configuration cannot elect. The operator sees a cluster with a majority of nodes up that refuses to accept writes.
- • Zombie member: an evicted node continues serving clients that can still reach it directly, so writes land in a node no longer in the cluster and are discarded when it eventually rejoins.
- • Silent under-replication: a node is evicted from the view used for placement but its data was never re-replicated, so partitions report full replication while one replica is unreachable.
- • Routing membership needs no coordination and should not have any; its value is that it is cheap and fast.
- • Correctness membership needs consensus. Every configuration change is a majority round trip, and it is unavailable exactly when the cluster is partitioned — which is precisely when you most want to change membership. This is the CAP trade in its sharpest form.
- • Actions authorised by membership must carry a version, so that a node acting on a stale configuration is rejected by the resource rather than trusted. Membership agreement alone is not enough; the enforcement point matters (Fencing Tokens: Making the Stale Actor Safe, Not Just Unlikely).
- • The cost is paid per membership change, not per request, which is what makes consensus-backed membership affordable at all.
- • Under partition, a consensus-backed membership cannot change on the minority side — which is correct, and means the minority cannot heal itself or re-replicate.
- • Under partition, gossip membership continues to change on both sides, each converging on a view that excludes the other.
- • A node evicted from membership may still be reachable by clients and still serving; membership does not stop it, only fencing at the data or resource does.
- • Views converge once the partition heals, but data written on both sides during it does not converge on its own — that is Anti-Entropy: Repairing Divergence Nobody Reported and Two Writes, No Order, One Answer Required work.
- • Detect: export each node’s view and diff them centrally. Disagreement about any member for more than a few seconds is the signal, and it is invisible from any single node.
- • Contain: freeze automatic reactions to membership change — rebalancing, re-replication, failover — during a suspected network event, so the cluster does not act on a bad detector.
- • Recover: restore connectivity first, membership second. Adding nodes to fix a membership problem usually deepens it.
- • Reconcile: after a partition heals, run Anti-Entropy: Repairing Divergence Nobody Reported over data written on both sides and resolve conflicts explicitly.
- • Verify: assert that every node reports the same configuration version, and that the number of nodes agreeing on the current configuration exceeds a majority.
- • Per-node membership view, diffed across the fleet. The single highest-value observability item in this lesson and almost nobody has it.
- • Configuration version and the number of nodes reporting each version.
- • Membership change events per hour, with a per-node breakdown. One host dominating means flapping, not cluster instability.
- • Time from suspicion to eviction and from eviction to re-replication — the window during which durability is reduced.
- • Count of nodes in
suspectstate right now. A steady non-zero count means the detector is mistuned for the network it is running on. - • Direct connectivity matrix between nodes where affordable; asymmetric partitions are otherwise nearly undiagnosable.
- • Any system where nodes join and leave and something must decide who counts — which is every stateful cluster.
- • When a small number of correctness decisions can be routed through a consensus-backed configuration while everything else uses cheap gossip.
- • When explicit graceful leave is possible, converting most membership events from inference to announcement.
- • When cluster size is modest and a consensus group can plausibly hold the whole configuration.
- • When one gossiped membership is used for both routing and quorum composition — the split-brain generator.
- • In clusters with high churn, where the membership protocol spends its capacity tracking change rather than serving.
- • Across high-latency or unreliable links, where timeouts tuned for a datacentre produce constant false suspicion.
- • When automatic reactions — rebalance, failover, eviction — are wired directly to a detector with no delay or damping.
- • An external coordination service (etcd, ZooKeeper, Consul) holding membership, so your system does not implement consensus itself. Fewer moving parts you own, one more dependency you must keep alive.
- • A static member list changed only by deploys. No detection, no ambiguity, no automatic recovery — genuinely correct for small fixed clusters and badly underrated.
- • Platform-managed membership, where the orchestrator already knows what is running and membership is observation rather than inference — the strongest option when available, because it has a source of truth the cluster itself lacks.
- • Lease-based membership: a node is a member only while it holds an unexpired lease, so silence removes it automatically without any eviction decision (Leases: Authority With an Expiry Date).
- • Avoid membership-dependent correctness entirely — stateless nodes behind a shared store push the whole problem into the store, which is often the right architecture (Coordination Avoidance: Restructuring the Problem Instead of Paying for It).
Membership is a belief, not a fact
- n6 — paused, not crashed — and nothing in the cluster can tell those apart
- n1believes “n6 = failed”✕ and it is false
- n2believes “n6 = failed”✕ and it is false
- n3believes “n6 = failed”✕ and it is false
- n4believes “n6 = alive”✓ and it is true
- n5believes “n6 = alive”✓ and it is true
- n6believes “n6 = alive”✓ and it is true
Every node above is acting on what it believes. Nothing in the cluster tells the mistaken one that it is mistaken.
| Gossiped membership | Consensus-backed membership | |
|---|---|---|
| Guaranteeprotocol | Eventual convergence in the absence of change. Views may disagree indefinitely under churn. | A single totally ordered sequence of configurations. Views may be stale but never contradictory. |
| Costprotocol | None. No leader, no quorum, no majority needed to make progress. | A majority round trip per configuration change — and unavailable exactly when the cluster is partitioned. |
| Use it fortypical | Routing, load hints, liveness signals — anywhere being wrong costs a retry. | Anything that decides who may act: quorum composition, ownership, leadership. |
| Under partitionprotocol | Keeps changing on both sides; each converges on a view excluding the other. | Cannot change on the minority side — so that side cannot heal itself or re-replicate. |
| Does eviction stop the node?protocol | No. It changes other nodes’ views; the evicted node may be healthy and still serving clients that reach it. | No. Agreement is not enforcement — only fencing at the resource stops it. |
What people believe, and what is true
The cluster knows which nodes are up.
Each node holds a belief derived from message arrival. There is no cluster-level observer, and the beliefs disagree.
A node that is evicted stops doing work.
Eviction changes other nodes’ views. The evicted node may be perfectly healthy and still serving clients that can reach it. Only fencing at the resource stops it.
Consensus-backed membership means the membership is correct.
It means everyone agrees on the same sequence of configurations. The configurations can still be wrong about which processes are running — agreement is not accuracy.
Growing a cluster from three to five nodes is one operation.
Done in one step it can create two disjoint majorities. It is two single-node additions, or one joint-consensus transition.
A restarted node is the same node.
Without an incarnation number, stale statements about the previous run apply to the new one, which resurrects dead nodes and re-kills healthy ones.
Go deeper
Only the levels this lesson can honestly fill — a missing level is a claim nobody had.
Overview
Membership is what each node believes about who else is present. Beliefs are formed from silence, they disagree, and no node can verify them.
Practical
Use two mechanisms. Cheap, gossiped, stale membership for routing, where being wrong costs a retry. Consensus-backed, versioned membership for anything that decides who may act. Make shutdown deregister explicitly, so most events are announcements rather than inferences.
Advanced
Tag every node with an incarnation number that increases on restart, and let a suspected node refute suspicion by broadcasting a higher incarnation. This turns a false positive into a one-round correction instead of an eviction, a rejoin and a rebalance.
Internals
Configuration changes must preserve quorum intersection. Adding two nodes at once to a three-node cluster admits an old majority and a new majority with no common member, so two leaders can be elected under the same term with no protocol violation. Single-server changes preserve intersection by construction; joint consensus does it by requiring both majorities during the transition. This is why production runbooks grow clusters one node at a time and refuse to do it during an incident.
Apply it
- 🔧 Dump the membership view from every node in a cluster you operate and diff them. Any standing disagreement is a finding.
- 🔧 Write down which decisions in your system depend on membership, and mark each as routing or correctness. Anything in the correctness column reading membership from gossip is a latent split brain.
- ⚡ A node pauses for eight seconds in garbage collection. The cluster evicts it, promotes a new leader, and the old node resumes and keeps writing. Trace the damage and name the mechanism that prevents it.
- ⚡ After a rack switch reboot, half the cluster forms one view and half another. Both keep serving. What do you do first, and what must you not do?
- 💬 Two nodes disagree about whether a third is up. Which one is right, and how would you find out?
- 💬 Why is adding two nodes to a three-node consensus cluster in one step unsafe?
- 💬 What is an incarnation number for, and what breaks without one?