Design Job Scheduler System
Mercor interview questions · Hard · System Design round · reported 3× · written walkthrough
This Mercor system-design round asks you to design a distributed job scheduler / work orchestration platform. Reports mention both a Marketplace-team version and a Frontier Data variant, but the core themes are the same.
Core requirements
- Accept both one-time jobs and recurring / cron jobs.
- Store schedule metadata, priority, retry policy, and optional dependencies.
- Dispatch due work to a distributed worker fleet.
- Support a DAG of job dependencies so downstream work runs only after upstream success.
- Track lifecycle states such as
PENDING,QUEUED,RUNNING,SUCCESS, andFAILED. - Prevent duplicate execution even during failover or retry storms.
A strong high-level design
- Job API + durable job store for writes, status, retry policy, and next-run metadata.
- Leader-elected scheduler tier so exactly one active node scans due jobs.
- Indexed scheduling lookup by next-run time, such as a DB index or Redis sorted set.
- Queue layer partitioned by priority and, if useful, by job class.
- Worker fleet that leases jobs, heartbeats, reports status, and retries failures.
- Dependency resolver that tracks unresolved upstream counts for DAG execution.
Discussion points interviewers probe
Run your code with Ctrl+Enter to see results.