Skip to content
All concepts

Concept

Leader election

Leader election is how a group of nodes chooses the one node that will take writes and coordinate the rest. When the leader stops responding, the others vote, and a candidate wins only with a majority. Requiring a majority is what prevents two leaders from being chosen at the same time.

Watch a follower's timer run out: it starts a new term, asks for votes and leads once a majority agrees. A live step from the lesson Leader election (Raft) (Consensus & replication). Timings and counts are illustrative.

Where you'll see it