Advertisement
One leader, four followers. Click 'Kill leader' to trigger election.
What you're seeing
Raft has three states: follower, candidate, leader. Followers timeout if they don't hear from the leader (randomized 150–300ms). On timeout, they become candidates and request votes. First to majority becomes leader.
Random timeouts spread out elections so split votes are rare. The new leader sends heartbeats to establish authority. Term numbers increase monotonically across elections.
★ KEY TAKEAWAY
Raft uses randomized timeouts so split votes are rare. When the leader dies, a new election completes in ~300-500ms.
▶ WHAT TO TRY
- Click Kill current leader and watch a new leader emerge.
- Notice the term number increments on each election.