Code Room
System designMediumsd-g213
Subject Distributed locksLevel Mid–Senior~35 minCommon in Networking & APIs · Concurrency · Distributed systems interviewsIndustries Technology, Software development

Question

Design a distributed cron/scheduler that runs ~5,000 recurring jobs (send daily digest emails, generate invoices, expire sessions) across a fleet of 30 worker nodes. Each scheduled job must run exactly once per scheduled tick — never zero times (missed) and never twice (duplicate invoice). Nodes can crash mid-run or be slow. How do you coordinate which node runs which job and guarantee single execution per tick?

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.