← DoorDash Interview Insights

DoorDash·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

System design round at DoorDash for a software engineering role. The whole thing was one big question about designing a distributed cron job scheduler, and they wanted serious depth across basically every dimension of the system. Brutal but fair.

Questions Asked (9)

Q1

Design a distributed cron job scheduler that supports cron expressions, time zones including DST, high availability, horizontal scalability to millions of jobs, and exactly-once or at-least-once execution semantics.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is the kind of question where you think you know where to start and then realize five minutes in that you've already painted yourself into a corner.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture with a distributed scheduler and worker pool. Dive into critical components like time zone handling with DST, job storage and sharding, and execution semantics with idempotency and deduplication. Discuss trade-offs and failure scenarios to demonstrate depth.

Pro tip: Emphasize how you handle DST transitions and time zone conversions correctly, as this is a common pitfall. Also, discuss how you achieve exactly-once semantics through idempotent job execution and deduplication, which shows maturity in distributed systems design.

1. Clarify Requirements and Scale

Ask questions to understand the scale (millions of jobs), required execution semantics (exactly-once vs at-least-once), and any constraints. Confirm support for cron expressions and time zones.

2. High-Level Architecture

Propose a distributed system with a scheduler service that stores jobs and triggers executions, and a worker pool that runs jobs. Use a message queue or distributed log for job dispatch.

3. Time Zone and DST Handling

Explain how to store jobs with time zone info and compute next run times using a library like Joda-Time or java.time. Handle DST by adjusting for offset changes and skipping or repeating jobs as needed.

4. Scalability and High Availability

Shard jobs across multiple scheduler instances using consistent hashing. Use leader election for coordination and replicate state for fault tolerance. Ensure workers can scale horizontally.

5. Execution Semantics and Reliability

For at-least-once, use a queue with acknowledgments and retries. For exactly-once, implement idempotent job execution and deduplication using unique job IDs and a distributed lock or transactional outbox.

Key Points to Mention

  • Cron expression parsing and next run time calculation with time zone support
  • DST transition handling: skip or repeat jobs based on policy
  • Sharding strategies for scalability (e.g., consistent hashing, range-based)
  • High availability via leader election (e.g., using ZooKeeper or etcd) and replication
  • Exactly-once semantics: idempotency, deduplication, and transactional guarantees
  • Monitoring, alerting, and backpressure for millions of jobs

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle leader election and failover to ensure high availability in the scheduler?

System DesignTechnical Trade-offs
Author's notes

Went with a lease-based approach using something like etcd or ZooKeeper.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scheduler's role and availability requirements, then propose a leader election mechanism (e.g., using a distributed consensus system like etcd or ZooKeeper) to ensure only one active scheduler. Describe failover detection and recovery, and discuss trade-offs like consistency vs. availability and split-brain prevention.

Pro tip: Emphasize the importance of idempotent operations and fencing tokens to prevent duplicate scheduling during failover, showing you understand real-world distributed systems pitfalls.

1. Clarify requirements and constraints

Ask about the scheduler's criticality, expected scale, and consistency needs to tailor the solution. This shows you avoid over-engineering and focus on the problem.

2. Choose a leader election mechanism

Propose using a distributed coordination service (e.g., etcd, ZooKeeper, Consul) or a consensus algorithm (e.g., Raft) to elect a single leader. Explain why it's suitable for the given constraints.

3. Design failover detection and recovery

Describe how to detect leader failure (e.g., heartbeats, leases) and trigger re-election. Outline the steps for a standby to take over and resume scheduling.

4. Address split-brain and consistency

Explain how to prevent multiple leaders (e.g., quorum-based election, fencing tokens) and ensure scheduling decisions remain consistent during transitions.

5. Discuss trade-offs and alternatives

Compare approaches (e.g., active-passive vs. active-active, different coordination services) and their impact on latency, complexity, and availability.

Key Points to Mention

  • Use of a distributed coordination service (etcd, ZooKeeper) for leader election
  • Lease-based heartbeats for failure detection and automatic failover
  • Fencing tokens or epochs to prevent split-brain and duplicate scheduling
  • Idempotent scheduling operations to handle retries and failover safely
  • Trade-offs between consistency and availability (CAP theorem) in leader election
  • Monitoring and alerting for leader election health and failover events

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Walk through how you'd implement idempotency and deduplication for job execution in this system.

System DesignTechnical Trade-offs
Author's notes

Blanked briefly and then talked about a dedup table keyed on job ID plus scheduled fire time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements and constraints, then propose a layered approach using idempotency keys and deduplication at both the API and worker levels. Discuss trade-offs between different storage options and failure scenarios, and conclude with how you'd handle edge cases like retries and partial failures.

Pro tip: Emphasize that idempotency is not just about preventing duplicate requests but also about ensuring consistent state in the face of retries and failures—mention the importance of idempotent operations in distributed systems and how you'd test for it.

1. Clarify Requirements and Constraints

Ask about the system's scale, expected failure modes, and consistency requirements to tailor your solution. Confirm whether the system is distributed and what guarantees are needed (e.g., exactly-once vs at-least-once).

2. Design Idempotency at the API Layer

Propose using client-generated idempotency keys for each job request, stored with a unique constraint in a fast datastore (e.g., Redis or DynamoDB) to detect duplicates. Explain how to handle key expiration and storage trade-offs.

3. Implement Deduplication in the Worker/Queue

Describe how workers can check a deduplication store before processing, using the job's unique identifier. Discuss using message deduplication features in queues (e.g., SQS FIFO) or a separate dedup table.

4. Handle Failure and Retry Scenarios

Explain how to ensure idempotency across retries: use conditional writes, versioning, or transactional outbox patterns. Discuss how to avoid race conditions with distributed locks or atomic operations.

5. Discuss Trade-offs and Monitoring

Compare storage options (Redis vs database) for performance vs durability, and discuss cleanup strategies. Mention monitoring duplicate rates and alerting on anomalies.

Key Points to Mention

  • Idempotency keys: client-generated unique identifiers for each request, stored with TTL
  • Deduplication store: Redis or database with unique constraints, considering performance and durability
  • Queue-level deduplication: using FIFO queues or message deduplication IDs
  • Exactly-once semantics: challenges and practical at-least-once with idempotent processing
  • Failure handling: retries, conditional writes, and transactional patterns
  • Monitoring and metrics: tracking duplicate attempts and system health

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you handle misfire scenarios, where a job misses its scheduled execution time, and what catch-up policies would you support?

System DesignData Modeling
Author's notes

Actually felt good about this one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what types of jobs (e.g., critical vs. non-critical), acceptable latency, and business impact of missed executions. Then propose a robust misfire handling strategy that includes detection, alerting, and configurable catch-up policies (e.g., fire once, fire all, skip) based on job semantics. Finally, discuss how to implement and monitor these policies in a distributed scheduler like Airflow or a custom system.

Pro tip: Emphasize idempotency and backpressure: catch-up policies must not cause duplicate side effects or overwhelm downstream systems. Mention that you'd make policies configurable per job and provide sensible defaults.

1. Clarify requirements and constraints

Ask about job criticality, acceptable delay, data freshness requirements, and downstream dependencies to determine appropriate misfire handling.

2. Detect and alert on misfires

Explain how to detect missed schedules (e.g., heartbeat monitoring, last-run timestamps) and set up alerts for immediate visibility.

3. Define catch-up policies

Propose configurable policies: skip (ignore missed runs), fire once (run immediately for the latest missed interval), fire all (backfill all missed intervals), and possibly a bounded catch-up (limit number of backfills).

4. Implement with idempotency and backpressure

Ensure job executions are idempotent to avoid duplicate effects, and implement rate limiting or queueing to prevent overwhelming systems during catch-up.

5. Monitor and iterate

Track metrics like misfire frequency, catch-up duration, and success rates; use these to refine policies and defaults over time.

Key Points to Mention

  • Idempotency: design jobs to be safely re-executable without side effects.
  • Configurable policies per job: not one-size-fits-all; allow job owners to choose.
  • Backpressure and rate limiting: prevent catch-up storms from overwhelming downstream services.
  • Alerting and observability: detect misfires quickly and monitor catch-up progress.
  • Trade-offs: latency vs. completeness; cost of backfilling vs. skipping.
  • Examples from schedulers: Airflow's catchup parameter, Quartz misfire instructions.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Describe how you'd design retry logic with backoff for failed job executions.

System DesignTechnical Trade-offs
Author's notes

Pretty standard.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the context: what kind of jobs, failure modes, and delivery guarantees are required. Then propose a retry strategy with exponential backoff and jitter, discussing trade-offs like retry limits, dead-letter queues, and idempotency. Finally, tie it to DoorDash's scale and reliability needs, emphasizing monitoring and alerting.

Pro tip: Mention that you'd add jitter to avoid thundering herd and use a dead-letter queue after max retries to prevent infinite loops. Also, highlight the importance of idempotent job handlers to safely retry without side effects.

1. Clarify requirements and constraints

Ask about job types, failure modes, latency tolerance, and delivery guarantees (at-least-once vs exactly-once). This shows you don't jump to solutions.

2. Design the retry policy

Propose exponential backoff with jitter, capped at a maximum delay, and a maximum number of retries. Explain how to calculate delays and why jitter is crucial.

3. Handle failures and dead-lettering

Describe what happens after max retries: move to a dead-letter queue for manual inspection or alerting. Discuss how to avoid retrying non-retryable errors (e.g., validation errors).

4. Ensure idempotency and state management

Explain that job handlers must be idempotent to avoid duplicate side effects. Mention using unique job IDs and deduplication mechanisms.

5. Monitor and iterate

Outline metrics to track (retry counts, success rates, DLQ size) and how to use them to tune backoff parameters. Emphasize observability and alerting.

Key Points to Mention

  • Exponential backoff with jitter to prevent thundering herd
  • Maximum retry limit and dead-letter queue for poison messages
  • Idempotent job handlers to ensure safe retries
  • Distinguishing retryable vs non-retryable errors
  • Monitoring and alerting on retry metrics and DLQ
  • Trade-offs between latency, throughput, and reliability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you support job dependencies, where one job should only run after another has completed successfully?

System DesignData Modeling
Author's notes

This tripped me up more than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what kind of jobs (batch, streaming, microservices), scale, and failure handling expectations. Then propose a dependency management system using a DAG-based scheduler with a metadata store to track job states, and discuss how to trigger downstream jobs upon successful completion. Finally, address edge cases like retries, timeouts, and partial failures.

Pro tip: Emphasize idempotency and exactly-once semantics for downstream jobs, as DoorDash deals with high-volume, real-time data where duplicate processing can cause incorrect orders or charges. Also, mention the importance of observability and alerting for dependency failures.

1. Clarify Requirements

Ask about the types of jobs, expected scale, latency requirements, and failure handling needs. This ensures your solution is tailored to the context.

2. Design Dependency Model

Propose representing jobs and dependencies as a Directed Acyclic Graph (DAG), where nodes are jobs and edges are dependencies. Discuss how to store and validate the DAG.

3. Job State Management

Describe a metadata store (e.g., database) to track job statuses (pending, running, succeeded, failed). Explain how to update states atomically and handle concurrent updates.

4. Triggering Downstream Jobs

Explain the mechanism to trigger dependent jobs upon successful completion, such as a scheduler polling the metadata store or an event-driven approach with message queues.

5. Handle Failures and Retries

Discuss strategies for retries, timeouts, and dead-letter queues. Emphasize idempotency and how to avoid cascading failures.

Key Points to Mention

  • DAG-based scheduling (e.g., Apache Airflow, Luigi, or custom scheduler)
  • Metadata store for job states (e.g., relational DB, ZooKeeper, etcd)
  • Event-driven triggers vs. polling for dependency resolution
  • Idempotency and exactly-once processing to handle retries safely
  • Failure handling: retries with backoff, timeouts, and dead-letter queues
  • Observability: logging, metrics, and alerting for job dependencies

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How would you implement multi-tenant isolation and quota enforcement in this scheduler?

System DesignTechnical Trade-offs
Author's notes

Talked about per-tenant rate limiting at the dispatcher level and quota configs stored in the metadata layer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the multi-tenancy model (e.g., shared vs. isolated resources) and the types of quotas (e.g., throughput, concurrency). Then propose a layered design: isolation at the data and execution levels, and quota enforcement via a distributed rate limiter with per-tenant counters. Discuss trade-offs between strict isolation and resource efficiency, and how to handle fairness and noisy neighbors.

Pro tip: Emphasize that quota enforcement must be distributed and consistent across scheduler instances, and mention using a token bucket with Redis or a similar store. Also, highlight the importance of monitoring and alerting on quota breaches to detect abuse or misconfiguration.

1. Clarify requirements and constraints

Ask about the expected number of tenants, isolation level (e.g., shared vs. dedicated resources), and types of quotas (e.g., jobs per second, concurrent jobs). Understand SLAs and fairness goals.

2. Design isolation mechanisms

Propose isolation at multiple layers: data isolation (e.g., separate queues or namespaces per tenant), execution isolation (e.g., resource limits via cgroups or containers), and network isolation if needed. Discuss trade-offs between strong isolation and overhead.

3. Implement quota enforcement

Use a distributed rate limiter (e.g., token bucket) with a shared store like Redis to enforce quotas across scheduler instances. Ensure atomic operations and handle failures gracefully (e.g., fallback to local limits).

4. Address fairness and noisy neighbors

Implement fair scheduling algorithms (e.g., weighted fair queuing) to prevent one tenant from monopolizing resources. Consider dynamic quota adjustments based on usage patterns.

5. Monitor, alert, and iterate

Set up metrics for quota usage and breaches, and alert on anomalies. Plan for gradual rollout and feedback loops to refine isolation and quota policies.

Key Points to Mention

  • Multi-tenancy models: shared vs. isolated resources, and their trade-offs
  • Distributed rate limiting using token bucket or leaky bucket algorithms
  • Data isolation techniques: separate queues, namespaces, or databases per tenant
  • Execution isolation: resource limits (CPU, memory) via cgroups or containers
  • Fair scheduling algorithms (e.g., weighted fair queuing) to prevent noisy neighbors
  • Monitoring and alerting for quota breaches and system health

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

What failure modes would you plan for, specifically around clock skew, network partitions, and worker crashes, and how does your design address them?

System DesignTechnical Trade-offs
Author's notes

Clock skew is sneaky.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that distributed systems must be designed for failure, then systematically address each failure mode (clock skew, network partitions, worker crashes) by explaining the problem, its impact, and your mitigation strategy. Tie your solutions back to the specific requirements of a food delivery platform like DoorDash, emphasizing correctness, availability, and user experience.

Pro tip: Demonstrate maturity by discussing trade-offs: for example, choosing eventual consistency over strong consistency during partitions to keep the system available, and using idempotency to handle retries safely. Also, mention how you would monitor and alert on these failure modes in production.

1. Acknowledge and Prioritize Failure Modes

Briefly state that you design for failure and list the three modes, explaining why each is critical in a distributed system like DoorDash (e.g., clock skew affects ordering, partitions affect availability, crashes affect reliability).

2. Address Clock Skew

Explain how you avoid relying on physical clocks for ordering (e.g., use logical clocks like Lamport timestamps or vector clocks) and use NTP with drift monitoring for absolute time needs, ensuring idempotent operations to handle out-of-order events.

3. Handle Network Partitions

Discuss your consistency model (e.g., eventual consistency with conflict resolution like CRDTs or last-write-wins with vector clocks) and how you ensure availability (e.g., AP systems, retries with exponential backoff, circuit breakers).

4. Mitigate Worker Crashes

Describe mechanisms like heartbeats, leases, and checkpointing to detect and recover from crashes, and use idempotent operations and exactly-once semantics (e.g., via message queues with deduplication) to avoid duplicate processing.

5. Summarize and Tie to Business Impact

Conclude by summarizing how these strategies ensure a reliable and scalable system for DoorDash, and mention monitoring/alerting to detect these failures in production.

Key Points to Mention

  • Use of logical clocks (Lamport timestamps, vector clocks) to avoid dependence on physical clocks for ordering.
  • Idempotency and deduplication to handle retries and out-of-order events caused by clock skew or crashes.
  • Consistency trade-offs: choosing AP (availability and partition tolerance) over CP for certain features, with conflict resolution strategies.
  • Heartbeats, leases, and checkpointing for crash detection and recovery.
  • Circuit breakers, retries with exponential backoff, and timeouts to handle network partitions gracefully.
  • Monitoring and alerting for clock drift, partition detection, and worker health.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q9

How would you approach observability for this system, including metrics, logs, distributed traces, and alerting?

System DesignTechnical Trade-offs
Author's notes

Covered the basics: job execution latency histograms, misfire rate counters, worker health metrics, trace IDs propagated through the dispatch chain.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's critical user journeys and SLOs, then design observability around those priorities using the three pillars: metrics, logs, and traces. Emphasize how you'd use each signal for detection, diagnosis, and root cause analysis, and close with actionable alerting tied to SLOs and runbooks.

Pro tip: Tie every observability choice to a concrete failure mode or SLO—interviewers at DoorDash care about reducing MTTD/MTTR for real-time delivery issues, so show how your plan helps on-call engineers quickly find and fix problems.

1. Clarify system and SLOs

Ask about the system's critical paths, expected traffic, and reliability targets. Define SLOs for latency, availability, and correctness to anchor your observability strategy.

2. Design metrics collection

Identify key metrics (e.g., request rate, error rate, latency percentiles, saturation) at each layer. Use tools like Prometheus and ensure high-cardinality dimensions are handled carefully.

3. Implement structured logging and tracing

Use structured logs with correlation IDs and distributed tracing (e.g., OpenTelemetry, Jaeger) to trace requests across microservices. Ensure logs are aggregated and searchable.

4. Set up alerting and dashboards

Create alerts based on SLO burn rates and symptoms, not causes. Build dashboards for on-call engineers to quickly assess system health and drill down.

5. Iterate and improve

Establish a feedback loop: review incidents, refine alerts, and add missing instrumentation. Use chaos engineering to validate observability coverage.

Key Points to Mention

  • SLOs and error budgets as the foundation for alerting
  • The three pillars: metrics, logs, and distributed traces, and when to use each
  • Structured logging with correlation IDs for request tracing
  • OpenTelemetry for vendor-neutral instrumentation
  • Alerting on symptoms (e.g., high latency) rather than causes (e.g., CPU spike)
  • Reducing alert fatigue and ensuring actionable alerts with runbooks

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.