Code Room
System designHardsd-g632
Subject Leader electionLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology, Software development

Question

Design a leader-election / coordination service so that a cluster of 30 stateless scheduler replicas elects exactly one active leader to run cron-like dispatch, with standbys ready to take over within seconds of a leader failure. Constraints: at most one leader acting at any instant (double-dispatch is harmful), failover under 5s, and the design must tolerate network partitions without two leaders both dispatching. Describe the election mechanism, how the leader proves it still leads, and the partition behavior.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.