Interactive LabClient-side Simulation

Raft Consensus Simulator

Distributed consensus visualization with leader election, log replication, and network partitions.

Raft Cluster active. Node 1 is current Leader (Term 1).
Client Command:
Quorum Required: 3 of 5 nodes
Node 1Leader
Term: 1
Partition: Active Quorum
Replicated Log:
x=10✓
Node 2Follower
Term: 1
Partition: Active Quorum
Replicated Log:
x=10✓
Node 3Follower
Term: 1
Partition: Active Quorum
Replicated Log:
x=10✓
Node 4Follower
Term: 1
Partition: Active Quorum
Replicated Log:
x=10✓
Node 5Follower
Term: 1
Partition: Active Quorum
Replicated Log:
x=10✓
Raft Safety Invariant:

• In Raft, a log entry is only Committed when written to a quorum (majority) of nodes. If the network splits into a minority partition (size 2) and majority partition (size 3), the minority can never commit new entries, preventing split-brain inconsistencies.