DoorDash System Design Interview: Distributed Job Scheduler

Based on questions reported for DoorDash interviews

The interviewer opens

Hi, and thanks for joining. Welcome to your interview for the software engineer role at DoorDash. We'll design a system together, with you sketching on the whiteboard on the right as you talk, and you can pause anytime with the Pause button at the top right if you need a break.

The problem is a distributed job scheduler for internal services, which matters at DoorDash for things like order reminders and delayed refunds. It's in the Problem tab, so please read through it and ask anything you'd like clarified before you start drawing.

The problem

Design a job scheduler for DoorDash's internal services. A service submits a job to run once at a given time or on a repeating schedule, and the scheduler makes sure each run happens on time and exactly once.

Must do

  • Submit a one-time job with a payload, target and run time
  • Submit a recurring job on a cron-style schedule
  • Execute each scheduled run by invoking the owning service's handler with the payload
  • Query a job's status and its run history

Must hold

  • Every scheduled run executes exactly once, even when workers crash mid-run
  • Runs start on time, with no drift for recurring jobs