Crash nodes, partition the network, watch leader election & log replication. The simulator is the algorithm — same paper, same invariants.
This is the Raft consensus algorithm running locally in your browser — same algorithm that runs etcd, CockroachDB, and Consul. The 5 dots are nodes. The lines between them are RPC channels. The traveling dots are messages in flight (cyan = AppendEntries, magenta = RequestVote).
Nothing is faked. Every leader you see won an actual majority vote. Every commit went through actual log replication and a quorum check.
{n1,n2} | {n3,n4,n5} partition. The minority side cannot elect a leader, ever — that's the safety property.No partition. The cluster reconciles to a single leader at the highest term.PROPOSE and hit →. Watch the entry replicate to followers, commit on the majority, then apply to each state machine. 10 of these invariants are checked in CI via tests/scripts/verify-raft-sim.mjs.
→ Click any node to crash/revive it. The 2-3 partition forces split-brain attempts; heal it and watch the higher-term side absorb the rest.