Layer 3 · Go deeper · 11 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How many timers sit in one partition-minute bucket?
How many store writes a second, and how many nodes?
How many executions are in flight at once?
Build-up · 5 steps
Build the high-level design
One functional requirement at a time, ending with a scheduler that works for one shard at moderate traffic.
Step 1 of 5
Schedule one-off and delayed jobs
The API dedupes, checks quota and converts the time to UTC, then writes a job row and a small timer in the bucket for its partition and minute. It answers 201 only once a quorum has both.
6 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 6
Interviewer
“Five billion jobs are waiting and up to 100k fall due each second. How do you find the due ones?”
Your move. Pick an approach:
Deep dive 2 of 6
Interviewer
“A worker charges a card, then crashes before reporting success. How do you make sure the job runs, but the charge happens once?”
Your move. Pick an approach:
Deep dive 3 of 6
Interviewer
“Up to 100k jobs fall due a second, far more than one node fires. How do you add nodes without firing jobs twice?”
Your move. Pick an approach:
Deep dive 4 of 6
Interviewer
“A bank API goes down for a minute at 10:00, and 300,000 reminder jobs fail. How do you retry them?”
Your move. Pick an approach:
Deep dive 5 of 6
Interviewer
“Assume 6M jobs fall due at 09:00:00 IST, 50k of them precise. How do the precise ones start within a second?”
Your move. Pick an approach:
Deep dive 6 of 6
Interviewer
“A New York tenant schedules
30 2 * * *. On 8 March 2026, clocks jump from 02:00 to 03:00. What does your scheduler do?”Your move. Pick an approach:
Build-up · 8 steps
Follow one 09:00 reminder through it
Only stages 4 to 6 decide how late a job starts, and they touch memory, one conditional write and a queue.
Step 1 of 8
Schedule
The payments service calls the API with an idempotency key. The API checks the tenant’s quota for that minute and spreads 09:00 IST to 03:34:12Z inside the window.