Consensus & Leader Election

Single cron leader

Ten stateless API pods each run a midnight billing cron. Jobs sometimes run twice, double-charging customers. Design leader election so exactly one pod runs the job, including what happens when the leader dies mid-run.

Advanced drill question.

Write it as you would say it in the interview: assumptions, the design, tradeoffs, and what you would do next. The draft saves in this browser.

Review the lesson