← DoorDash Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at DoorDash where they basically handed me a distributed cache problem and said go. It was one of the more exhausting design sessions I've had, lots of follow-ups and they kept pushing on trade-offs every time I thought I was done.

Questions Asked (6)

Q1

How would you scale a local LRU cache into a fully distributed caching system? Walk through sharding, consistent hashing with virtual nodes, rebalancing during node joins and leaves, and how you'd handle hot keys.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This was the core of the whole session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem: moving from a single-node LRU cache to a distributed system requires partitioning data, routing requests, and handling failures. Then walk through the core components: sharding with consistent hashing and virtual nodes, rebalancing strategies for node changes, and techniques for hot keys. Emphasize trade-offs and practical considerations for a production system like DoorDash.

Pro tip: Mention that consistent hashing with virtual nodes reduces rebalancing overhead and improves load distribution, but also discuss the need for a coordination service (e.g., ZooKeeper, etcd) to manage membership and detect failures. This shows you understand real-world complexity beyond the algorithm.

1. Clarify requirements and constraints

Ask about scale (QPS, data size), latency SLAs, consistency needs, and failure tolerance. This sets the stage for design decisions.

2. Design sharding and routing

Explain how to partition the key space using consistent hashing with virtual nodes. Describe how clients or a proxy layer route requests to the correct node.

3. Handle rebalancing during node joins/leaves

Detail how consistent hashing minimizes data movement. Discuss strategies like gradual rebalancing, data handoff, and ensuring availability during transitions.

4. Address hot keys

Propose solutions like key splitting, local caching, request coalescing, or dynamic replication. Discuss trade-offs of each approach.

5. Discuss operational aspects

Cover monitoring, failure detection, consistency guarantees, and how to handle cache invalidation across nodes.

Key Points to Mention

  • Consistent hashing with virtual nodes for even distribution and minimal rebalancing
  • Sharding strategies: range-based vs. hash-based, and why consistent hashing is preferred
  • Rebalancing techniques: incremental migration, dual writes, and read repair
  • Hot key mitigation: key splitting (e.g., adding a random suffix), local caching, and request coalescing
  • Coordination service (e.g., ZooKeeper, etcd) for membership and failure detection
  • Trade-offs: consistency vs. availability, latency vs. throughput, and complexity of implementation

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

Q2

What replication strategy would you use for this distributed cache, and how would you handle failure detection and request routing?

System DesignTechnical Trade-offs
Author's notes

I went with async replication to a fixed number of replicas and talked through gossip-based failure detection.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (read/write ratio, consistency needs, latency SLOs) and then propose a replication strategy like consistent hashing with replication factor 3, explaining trade-offs between consistency and availability. Cover failure detection using gossip or heartbeats, and request routing via a smart client or proxy that maintains cluster membership.

Pro tip: Tie your choices to DoorDash's specific needs: low-latency reads for menu data, high availability during peak hours, and tolerance for eventual consistency. Mention how you'd monitor and tune the system over time.

1. Clarify requirements and constraints

Ask about read/write patterns, data size, consistency requirements, latency targets, and failure tolerance to tailor your design.

2. Choose replication strategy

Propose a replication approach (e.g., primary-backup, multi-primary, or quorum-based) and justify it based on the requirements, discussing trade-offs.

3. Design failure detection

Explain how nodes detect failures (heartbeats, gossip, phi accrual) and how the system reacts (e.g., marking nodes as suspect, triggering re-replication).

4. Define request routing

Describe how clients or proxies route requests to the correct replicas, including handling of failures and consistency guarantees (e.g., read-your-writes).

5. Discuss trade-offs and optimizations

Summarize key trade-offs (consistency vs. availability, latency vs. durability) and suggest optimizations like hinted handoff or read repair.

Key Points to Mention

  • Consistent hashing with virtual nodes for even data distribution and minimal disruption during scaling.
  • Replication factor and quorum (e.g., R+W > N) to tune consistency levels.
  • Failure detection using gossip protocol (e.g., SWIM) or heartbeats with timeouts.
  • Request routing via a smart client that caches cluster metadata or a dedicated proxy (e.g., Envoy).
  • Handling failures: hinted handoff, read repair, and anti-entropy for eventual consistency.
  • Monitoring and metrics: track replication lag, failure detection accuracy, and request latency.

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

Q3

Describe the read and write paths for your distributed cache design.

System DesignAPI & Integrations
Author's notes

Pretty standard once you've done the rest of the design.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the distributed cache (e.g., consistency, latency, scale). Then walk through the read and write paths step by step, explaining how data is stored, retrieved, and kept consistent across nodes. Finally, discuss trade-offs and how you would handle failures and scaling.

Pro tip: Always tie your design to DoorDash's specific use cases, such as caching restaurant menus or delivery ETAs, and mention how you'd measure and monitor cache hit rates and latency in production.

1. Clarify Requirements and Assumptions

Ask about expected read/write ratio, data size, consistency needs, and latency SLAs. State your assumptions clearly to guide the design.

2. High-Level Architecture

Describe the cache cluster, partitioning strategy (e.g., consistent hashing), replication, and how clients interact with it (e.g., via a cache client library).

3. Read Path

Explain how a read request is routed to the correct node, how cache hits/misses are handled, and how data is fetched from the backing store on a miss and then populated.

4. Write Path

Detail how writes are handled: write-through vs. write-back, cache invalidation strategies, and how consistency is maintained across replicas.

5. Trade-offs and Failure Handling

Discuss trade-offs (e.g., consistency vs. availability), and how to handle node failures, hot keys, and cache stampedes.

Key Points to Mention

  • Consistent hashing for partitioning and rebalancing
  • Replication for fault tolerance and read scalability
  • Cache invalidation strategies (TTL, write-through, write-back)
  • Handling cache misses and stampedes (e.g., request coalescing)
  • Monitoring and metrics (hit rate, latency, eviction rates)
  • Trade-offs between consistency and availability (CAP theorem)

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

Q4

How would you handle cache consistency? Talk through TTL-based expiry, write-through vs write-back strategies, and cache invalidation.

System DesignTechnical Trade-offs
Author's notes

Write-back vs write-through is a classic trade-off question and I've answered it before, so this felt more comfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing cache consistency as a trade-off between latency, throughput, and data freshness, then walk through TTL expiry, write-through vs write-back, and invalidation strategies with concrete examples. Tie your answer to DoorDash's use cases like menu data, restaurant availability, or order status to show practical relevance.

Pro tip: Mention that cache invalidation is not just about deletion—it's about ordering and atomicity; for example, invalidating after a DB write but before the next read can cause stale reads, so consider versioning or write-through with short TTLs. Also, highlight that DoorDash likely uses a hybrid approach: TTL for non-critical data and explicit invalidation for critical data like order state.

1. Define consistency requirements

Clarify what level of consistency is needed for different data types (e.g., menu items vs. order status) and the acceptable staleness window. This sets the context for choosing strategies.

2. Explain TTL-based expiry

Describe how TTL provides eventual consistency by automatically expiring stale entries, and discuss trade-offs like stale reads within TTL and thundering herd on expiry.

3. Compare write-through vs write-back

Contrast write-through (synchronous, strong consistency, higher write latency) with write-back (asynchronous, lower latency, risk of data loss) and when to use each.

4. Discuss cache invalidation strategies

Cover invalidation approaches: write-invalidate (delete/update cache on write), write-update (update cache on write), and versioning. Address race conditions and ordering.

5. Recommend a hybrid approach

Propose a combination: e.g., write-through with short TTL for critical data, and TTL-based expiry for less critical data, with explicit invalidation on updates.

Key Points to Mention

  • TTL expiry: automatic, simple, but can serve stale data; use jitter to avoid thundering herd.
  • Write-through: strong consistency, higher write latency; good for critical data like order status.
  • Write-back: low latency, eventual consistency, risk of data loss on cache failure; suitable for non-critical data like menu views.
  • Cache invalidation: delete vs update on write; use versioning or timestamps to handle race conditions.
  • Consistency models: strong vs eventual; choose based on business impact of stale data.
  • DoorDash context: menu data can tolerate some staleness, but order state and driver location need near-real-time consistency.

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

Q5

How does your design hold up under network partitions, and what fault tolerance guarantees can you make?

System DesignTechnical Trade-offs
Author's notes

CAP theorem came up immediately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the failure model and the specific guarantees your system provides (e.g., availability vs. consistency). Then walk through the mechanisms that enforce those guarantees during partitions, such as quorum-based replication, idempotent operations, and graceful degradation. Finally, quantify the trade-offs and residual risks, showing awareness of CAP theorem and business impact.

Pro tip: Tie your fault tolerance guarantees to concrete SLAs and business metrics (e.g., order loss rate, p99 latency during partitions) to demonstrate that you think beyond pure technical correctness.

1. Define the failure model

Clarify what a network partition means in your system (e.g., split-brain, asymmetric failures) and which components are affected. State your assumptions about node failures and message loss.

2. State the guarantees

Explicitly list the guarantees your design provides during partitions, such as availability, durability, or consistency. Reference CAP theorem and explain which trade-off you chose and why.

3. Explain the mechanisms

Describe the technical mechanisms that enforce those guarantees: replication strategies (e.g., quorum, leader election), conflict resolution (e.g., CRDTs, last-write-wins), and idempotency to handle retries.

4. Discuss degradation and recovery

Explain how the system degrades gracefully (e.g., read-only mode, cached responses) and how it recovers after the partition heals (e.g., anti-entropy, reconciliation).

5. Quantify trade-offs and risks

Acknowledge the costs of your choices (e.g., increased latency, potential data loss) and any residual risks. Tie these to business impact and SLAs.

Key Points to Mention

  • CAP theorem and the specific consistency/availability trade-off chosen
  • Replication strategy (e.g., quorum, multi-leader) and its implications
  • Idempotency and exactly-once semantics for critical operations like payments
  • Graceful degradation techniques (e.g., fallback to cached data, queueing writes)
  • Recovery and reconciliation mechanisms after partition healing
  • Monitoring and alerting for partition detection and SLA adherence

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

Q6

How would you monitor this system and plan capacity for it?

System DesignProduct Analytics & Metrics
Author's notes

Saved this for the end and kind of rushed it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the key metrics that reflect system health and business success, then outline a layered monitoring strategy covering infrastructure, application, and business levels. For capacity planning, describe how you would use historical trends, load testing, and forecasting to ensure the system scales with demand while optimizing cost.

Pro tip: Tie monitoring metrics directly to DoorDash's core business KPIs like order throughput, delivery time, and Dasher utilization to show you understand the product context. Also, mention setting up automated alerts with clear escalation paths and runbooks to demonstrate operational maturity.

1. Define Metrics and SLOs

Identify the critical user journeys and system components, then define SLIs (e.g., latency, error rate, throughput) and set SLOs/SLAs for each. Ensure metrics cover infrastructure, application, and business levels.

2. Implement Monitoring and Alerting

Choose tools (e.g., Prometheus, Grafana, Datadog) to collect and visualize metrics, logs, and traces. Set up alerts with thresholds and anomaly detection, and integrate with incident management systems like PagerDuty.

3. Analyze and Iterate

Regularly review dashboards and alerts to identify trends, false positives, and gaps. Use post-mortems and feedback loops to refine metrics and thresholds continuously.

4. Forecast Capacity Needs

Use historical data and business growth projections to forecast future resource requirements (CPU, memory, storage, network). Perform load testing to validate assumptions and identify bottlenecks.

5. Plan and Optimize Resources

Develop a capacity plan with scaling strategies (horizontal/vertical, auto-scaling) and cost optimization (reserved instances, spot instances). Schedule regular reviews to adjust based on actual usage.

Key Points to Mention

  • Use of RED method (Rate, Errors, Duration) for microservices and USE method (Utilization, Saturation, Errors) for infrastructure
  • Importance of distributed tracing (e.g., Jaeger, OpenTelemetry) for debugging latency in microservices
  • Setting up SLOs and error budgets to balance reliability and feature velocity
  • Leveraging auto-scaling groups and Kubernetes HPA for dynamic capacity adjustments
  • Conducting load testing (e.g., Locust, JMeter) and chaos engineering to validate capacity plans
  • Monitoring business metrics like orders per second, delivery time, and Dasher supply/demand ratio

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