Distributed periodic scheduler

DesignHard45 min

Your task

Design a scheduler that runs periodic jobs (cron-like, e.g. "send the 9am digest", "reconcile billing hourly") across a fleet of N identical scheduler nodes for high availability, where each scheduled trigger must fire on exactly one node, double-execution sends duplicate emails or double-charges. Constraints: any node can die, the schedule must keep firing, and a network partition must not cause two nodes to both fire the same tick. Describe how a tick is claimed, how concurrent nodes coordinate, and the duplicate-firing safeguards.

It covers

  • Double execution
  • Cron
  • Exactly once trigger