Leader Election
Picking exactly one node to be in charge — and handling the moment the old leader doesn’t know it lost.
Leader election designates one node to coordinate (order writes, assign work) so the rest can follow. The hard part is not choosing — consensus or a lease from etcd/ZooKeeper handles that — but the deposed leader that keeps acting on stale authority. Leases with expiry plus fencing tokens (monotonic epoch numbers checked by downstream systems) are the standard defense.
Worked example: leader election picks one node to coordinate (own writes, run a job) so the cluster never has two masters; consensus protocols like Raft do this via majority vote plus heartbeats. Gotcha: the danger is split-brain — a partition making two nodes each think they lead; fencing tokens or quorum prevent both from acting, at the cost of halting when quorum is lost.