Glossary

Leader Election

Picking a single coordinator among nodes, and agreeing on a new one when it dies.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

Picking a single coordinator among nodes, and agreeing on a new one when it dies.

How it works

Many systems need exactly one node in charge (the write primary, the scheduler). A consensus protocol (Raft, Paxos) or a coordination service (ZooKeeper, etcd) elects the leader and uses leases/heartbeats to fail over safely. The danger is split-brain — two nodes both believing they're leader — which fencing tokens and quorums prevent.

Common questions

What is Leader Election?

Picking a single coordinator among nodes, and agreeing on a new one when it dies.

How does Leader Election work?

Many systems need exactly one node in charge (the write primary, the scheduler). A consensus protocol (Raft, Paxos) or a coordination service (ZooKeeper, etcd) elects the leader and uses leases/heartbeats to fail over safely. The danger is split-brain — two nodes both believing…

What is Leader Election used for in system design?

Many systems need exactly one node in charge (the write primary, the scheduler). A consensus protocol (Raft, Paxos) or a coordination service (ZooKeeper, etcd) elects the leader and uses leases/heartbeats to fail over safely. The danger is split-brain — two nodes both believing…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →