Multiple ChoiceHard 45s
Sharded Timers for Job Scheduler
How does a large-scale scheduler efficiently fire millions of timers without a single hot queue?
Options
- 1Keep every due timer in one large in-memory heap owned and scanned by a single scheduler node
- 2Poll one single shared database row every second on every scheduler to discover which jobs are due
- 3Shard timers across nodes by time bucket and key, each node owning a disjoint slice and using a leader per shard
- 4Rely on the host-level OS cron daemon running independently on each machine to fire each timer
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.