RobinhoodSystem Design·60 minFree preview
Job Scheduler System Design
Design a distributed job scheduler that runs typed jobs under an SLA, surfaces failures and logs, and guarantees each job runs at most once. The anchor Robinhood system-design prompt, especially for Senior+; often delivered nearly word-for-word and open-book.
SWE
system-design
job-system
scheduling
idempotency
retry
distributed-systems
Frequency
High
Last asked
2026-11-04
Stage
phone-screen · onsite-system-design
Problem
- Schedule and run jobs of a given type. Each job has an SLA; if it exceeds the deadline, raise/record an error and let the user inspect logs.
- Support recurring jobs (e.g. a job that runs every minute).
- Guarantee at-most-once execution per scheduled run.
- Handle a broad range of failure cases gracefully — this is where most of the follow-up time goes.
Variants
Cron-only, at-least-once
Another onsite version states the requirements differently:
- 100,000 job definitions.
- 10,000 concurrent job runs.
- All jobs are cron jobs — no immediate runs.
- At-least-once guarantee (rather than at-most-once).
The delivery guarantee differs between versions — clarify before designing.
Pitfalls
- The round is open-book and the prompt is stable, so the front half carries little differentiation. Proactively and thoroughly cover reliability and fault tolerance early; candidates who leave it thin get walked into follow-up traps and run out of time.
- A frequently added constraint is that the scheduler only handles a single job type — don't over-generalize the model.
- Interviewers often prepare from the same public reference designs, but won't accept them on autopilot: a candidate who added a separate
Scheduleentity was asked to justify why it isn't stored with the job. Have your own reasoning for each entity and constraint. - Spend the first ~5 minutes pinning down requirements (cron-only vs immediate runs, delivery guarantee) before drawing anything; the rest of the round follows a standard design flow and the follow-ups build on what you agreed.
Follow-ups
A worker or pipeline component dies mid-run: how do you keep at-most-once and still retry?
Retry strategy and backoff; how retries interact with the at-most-once guarantee.
Design data sharding and the database schema, including partition-key and sort-key choices.
Job status never gets updated: how do you keep jobs from being lost?
Why a Redis queue, and what happens if that queue fails?
How are updates pushed or broadcast to subscribers?
How does the scheduler find which job IDs are due now (no need to write SQL), and how often does it poll?
How do you detect a run that has exceeded its SLA?
Preparation
- Build a reference design end-to-end (queue + workers + a durable job/lease store + a notifier) and rehearse the at-most-once claim via conditional writes.
- Pre-script the failure-handling story: worker crash, lost notification on recurring-job failure, and retry/backoff — these are the graded follow-ups.
- Work through a standard public job-scheduler reference design, which maps directly onto this prompt — then rehearse justifying each entity in your own words rather than reproducing it.
- Rehearse the trigger path end-to-end: how due jobs are found (next-run-time index), the polling interval you pick and why, and how an SLA watchdog flags runs that overrun.
- Rework the design for the cron-only, at-least-once version at 100k definitions / 10k concurrent runs.
Was this article helpful?
Comments
Sign in to join the discussion
Loading...
