Consensus & replication
Quorum Table
Draw a partition through a five-node Raft cluster and watch it refuse to split-brain.
How to read this lab
A 5-node Raft cluster is committing log entries automatically through whichever node is currently the elected leader. Split the cluster into two groups and watch only the majority side (3+ nodes) keep committing — the minority side freezes and can never elect its own leader or advance, no matter how long you wait.
Controls
- Node buttons (N0–N4)
- Click to assign each node to Group A or Group B before partitioning.
- Partition network
- Cuts all communication between Group A and Group B, in both directions — enabled once each group has at least one node.
- Heal partition
- Restores communication between all nodes so they can reconverge.
- Auto-propose entries
- Always on — new log entries are proposed automatically through the current leader so there's always something happening.
What to watch for
- Split 2 nodes vs 3 nodes, then Partition network — Majority commit keeps climbing, Minority commit freezes at its exact value from the moment you cut the wire.
- The minority side never shows a new leader, however long you wait.
- Click Heal partition — all 5 nodes converge to the same commit index within a few seconds.
- The Split-brain check reads PASS throughout: no term ever shows two nodes both claiming leader.
Why it happens
A node can only become leader with votes from a strict majority — 3 of 5. A 2-node minority can never reach 3 votes no matter how many elections it runs, so it can never elect a leader and never commits new entries. The 3-node majority can still reach quorum, so it elects a leader and keeps committing normally. This majority requirement is the entire mechanism that prevents split-brain — there's no special-case code checking for it, it falls straight out of the arithmetic of what counts as a majority.
Try this first — Assign nodes 0 and 1 to Group A, leave 2, 3, and 4 in Group B, then Partition network — watch Minority commit freeze while Majority commit keeps moving.
Warming up…
The cluster just (re)started — nodes are counting down their randomized election timeouts before the first vote is cast.
- Leader
- Follower
- Candidate
- Frozen (minority, no quorum)
- Replication pulse
Partition groups
Assign each node to group A or group B, then partition the network. Messages between the groups are dropped in both directions.
Group A: 0, 1 · Group B: 2, 3, 4
Log entries
Current term
0
Commit index
—
Minority commit
n/a
No active partition
Split-brain check
PASS
At most one leader observed per term