Skip to content

Leader election, leases and fencing tokens

Why a timeout cannot prove a leader is dead, how leases bound authority in time, and why only a fencing token checked by the resource stops a zombie leader.

30 min7 steps

By the end you can
  • Explain split brain and why only intersecting quorums prevent two leaders in one term
  • Size a lease's safety margin for clock drift and state what a lease assumes
  • Explain how a paused or partitioned holder corrupts data, and how fencing tokens checked by the resource prevent it

Split brain: two leaders at once

writeswritesOld leaderpaused, now awakeNew leaderelectedShared data
Silence does not prove death. Quorum arithmetic: two leaders in one term need 2q votes, so require 2q > N.

Loading question…

Answer this step to continue.