Backend & systems·Consistency and replication
you need exactly one instance to run the nightly job, so the instances have to agree among themselves who it is.
Leader election
Choosing a single coordinator among peers, typically via a consensus store with leases. It is how you get singleton behaviour out of a horizontally scaled deployment. Elections are not instantaneous or unambiguous, so any leader-only work must also be safe to run twice, briefly, during handover.