Raft
Majority Elects a Leader
A candidate becomes leader only with a majority of votes.
A majority elects a leader
A candidate becomes leader only after it has a majority of votes in its term. The vote tally is recomputed from the timeout event. Note: the leader role appears after the win event.
Vote tally
The majority threshold is 2 out of 3 nodes, and the tally has 3 votes. Note: the tally is shown in the render.
a simplified Raft over a tiny cluster: terms, votes, leader election, and the term-restricted commit rule are exact on these traces; the full safety proof, membership changes, snapshotting, log compaction, and real RPC/timing are beyond these traces - no product claims.
Leader installed
The compiled trace has 1 leader. Note: the leader is a result of replaying the win event.
a simplified Raft over a tiny cluster: terms, votes, leader election, and the term-restricted commit rule are exact on these traces; the full safety proof, membership changes, snapshotting, log compaction, and real RPC/timing are beyond these traces - no product claims.
Summary
A majority is what turns a candidate into a leader for a term. Note: this is simplified Raft; the full safety proof, membership changes, snapshots, and real timing are beyond these traces.