Leader election.
also: leader elections · elect a leader · elected leaderNodes agreeing that exactly one of them is the leader that does the work, and choosing a new one when it fails.
the two-minute refresher
- Example: only one scheduler should fire the 2 a.m. billing job.
- Usually built on a coordination service (etcd, ZooKeeper) using leases or consensus.
- Hard part: a paused or partitioned leader may still think it leads.
- So pair election with fencing tokens that let resources reject a stale leader.