← DoorDash Interview Insights

DoorDash·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

System design round at DoorDash for an MLE role, focused entirely on infra for a large-scale recommendation system. No model architecture stuff, just the serving layer, which I wasn't fully expecting going in.

Questions Asked (6)

Q1

Walk me through the high-level architecture for serving real-time recommendations at scale, including both the online request path and any offline or batch components.

System DesignTechnical Trade-offs
Author's notes

I started with the online path and worked backwards to the batch side, which felt natural but I think I spent too long on the request flow before even mentioning the batch jobs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and latency requirements, then describe a two-part system: an online serving path for low-latency inference and an offline pipeline for training and feature generation. Emphasize how the two interact through feature stores and model registries, and discuss trade-offs like freshness vs. latency and consistency vs. availability.

Pro tip: Highlight the importance of feature consistency between offline and online environments to avoid training-serving skew, and mention how you'd monitor and mitigate it in production.

1. Clarify Requirements and Constraints

Ask about scale (QPS, number of users/items), latency SLAs (e.g., <100ms), and freshness needs (real-time vs. batch). This shows you tailor the design to the problem.

2. Outline the Online Serving Path

Describe the request flow: client -> API gateway -> recommendation service -> feature retrieval (from online feature store) -> model inference -> ranking -> response. Mention caching, load balancing, and fallbacks.

3. Describe the Offline/Batch Components

Cover data ingestion, feature engineering (batch and streaming), model training, evaluation, and deployment. Explain how models and features are versioned and pushed to production.

4. Explain the Interaction Between Online and Offline

Detail how the feature store ensures consistency, how models are updated (e.g., canary, shadow), and how feedback loops (e.g., logging user interactions) feed back into training.

5. Discuss Trade-offs and Scalability

Address trade-offs like latency vs. accuracy, cost vs. performance, and how you'd scale each component (e.g., sharding, replication, autoscaling). Mention monitoring and A/B testing.

Key Points to Mention

  • Feature store (e.g., Feast, Tecton) for online/offline consistency
  • Low-latency model serving (e.g., TensorFlow Serving, TorchServe, or custom microservice)
  • Streaming vs. batch feature computation (e.g., Kafka, Flink, Spark)
  • Model versioning and deployment strategies (canary, shadow, A/B testing)
  • Caching and precomputation of recommendations for hot users/items
  • Monitoring for data drift, model performance, and system health

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

Q2

How would you design the caching layer for this recommendation system? What do you cache, what are your cache keys, how do you set TTLs, and how do you handle staleness?

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where I felt most comfortable and also where I probably over-explained.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the recommendation system's requirements (latency, scale, freshness) and then propose a multi-tier caching architecture (e.g., client, CDN, application, database). Focus on what to cache (user features, item features, model outputs, embeddings), how to design cache keys (user_id, item_id, model_version, context), TTL strategies (time-based, event-based, adaptive), and staleness handling (versioning, invalidation, fallbacks).

Pro tip: Emphasize that cache design must align with business metrics (e.g., conversion rate) and that you'd monitor cache hit ratio and staleness impact via A/B tests. Also, mention that for DoorDash, real-time personalization and geo-context are critical, so caching must be context-aware.

1. Clarify Requirements and Constraints

Ask about scale (QPS, users, items), latency SLAs, freshness requirements, and consistency needs. This determines cache granularity and TTLs.

2. Identify What to Cache

List cacheable components: user features, item features, model embeddings, recommendation lists, and scores. Prioritize based on reuse and computation cost.

3. Design Cache Keys and Structure

Define keys that include user_id, item_id, model_version, context (e.g., location, time), and experiment_id. Use hierarchical or composite keys for flexibility.

4. Set TTL and Invalidation Policies

Choose TTLs based on data volatility (e.g., short for real-time features, longer for static embeddings). Implement event-driven invalidation for model updates or user actions.

5. Handle Staleness and Failures

Use versioning to serve stale data gracefully, implement fallback to real-time computation, and monitor staleness impact. Consider write-through/write-behind patterns.

Key Points to Mention

  • Multi-tier caching (client, CDN, application, database) to reduce latency at each level.
  • Cache key design including user_id, item_id, model_version, and contextual features (e.g., location, time of day).
  • TTL strategies: time-based (e.g., 5 min for user features), event-based (e.g., invalidate on new order), and adaptive TTL based on hit rate.
  • Staleness handling: versioned caches, stale-while-revalidate, and fallback to real-time model inference.
  • Monitoring and metrics: cache hit ratio, staleness impact on CTR/conversion, and A/B testing for TTL tuning.
  • Trade-offs: memory vs. freshness, consistency vs. availability, and cost of cache misses.

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

Q3

How do you scale the candidate generation and ranking services to handle spiky, high-QPS traffic across multiple regions?

System DesignTechnical Trade-offs
Author's notes

Talked about stateless ranking workers behind a load balancer with autoscaling, and stateful embedding stores that you shard by user or item ID.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale (QPS, latency SLOs, regions) and the two-stage architecture (candidate generation then ranking). Then walk through a layered scaling strategy: multi-region deployment with geo-routing, horizontal scaling of stateless services, caching and precomputation, and graceful degradation. Finally, discuss trade-offs between consistency, latency, and cost, and how to handle spiky traffic with autoscaling and load shedding.

Pro tip: Emphasize that candidate generation and ranking have different scaling characteristics: candidate generation is often more amenable to caching and approximate nearest neighbor (ANN) indexes, while ranking is more compute-intensive and may need model distillation or early-exit strategies. Also, mention that DoorDash's traffic is highly spiky due to meal times, so pre-warming and predictive autoscaling are key.

1. Clarify requirements and constraints

Ask about expected QPS, latency SLOs, regional distribution, data freshness requirements, and budget constraints. This ensures your answer is tailored to the actual problem.

2. Design multi-region architecture

Propose deploying services in multiple regions with geo-based routing to reduce latency and handle regional spikes. Discuss data replication and consistency trade-offs for models and features.

3. Scale candidate generation

Use ANN indexes (e.g., FAISS, ScaNN) with sharding and replication. Cache frequent queries and precompute candidates for known contexts. Employ autoscaling based on QPS and latency.

4. Scale ranking service

Optimize model inference with batching, quantization, and distillation. Use horizontal scaling with load balancers. Consider tiered ranking (lightweight model first, then heavy model for top candidates).

5. Handle spiky traffic and failures

Implement predictive autoscaling (e.g., based on historical patterns), load shedding, and graceful degradation (e.g., fallback to simpler models or cached results). Use circuit breakers and rate limiting.

Key Points to Mention

  • Multi-region deployment with geo-routing and data replication strategies (e.g., active-active or active-passive).
  • Caching and precomputation for candidate generation (e.g., ANN indexes, query result caching).
  • Model optimization techniques for ranking: quantization, distillation, batching, and tiered ranking.
  • Autoscaling policies: reactive vs. predictive, and using metrics like QPS, latency, and queue depth.
  • Graceful degradation: fallback to simpler models, cached results, or default rankings during spikes.
  • Trade-offs: latency vs. consistency, cost vs. performance, and complexity vs. reliability.

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

Q4

What are your storage choices for the feature store, embedding store, and item catalog, and what consistency guarantees do you need from each?

System DesignData ModelingTechnical Trade-offs
Author's notes

I went with a low-latency key-value store for features and embeddings, something like Redis or a purpose-built vector store, and a separate item store with eventual consistency being acceptable for the catalog.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the access patterns and scale for each store, then propose storage technologies that match those patterns, and finally specify the consistency guarantees needed to meet business and ML requirements. Emphasize trade-offs between consistency, latency, and cost, and tie your choices back to DoorDash's real-time delivery marketplace.

Pro tip: Show that you understand the difference between consistency for model training (batch, eventual) versus online serving (low-latency, strong or read-your-writes), and mention how you'd monitor and enforce those guarantees in production.

1. Clarify requirements and access patterns

Ask about data volume, read/write ratios, latency SLAs, and whether the use case is online serving or offline training. This determines the storage and consistency needs.

2. Propose storage for feature store

Suggest a dual-store architecture: an offline store (e.g., S3 + Parquet, BigQuery) for training and a low-latency online store (e.g., Redis, DynamoDB) for serving. Explain why each fits.

3. Propose storage for embedding store

Recommend a vector database (e.g., FAISS, Pinecone, Milvus) for similarity search, possibly backed by object storage for persistence. Discuss index type and refresh strategy.

4. Propose storage for item catalog

Choose a transactional database (e.g., PostgreSQL, DynamoDB) for structured item metadata, with caching (e.g., Redis) for high-read throughput. Consider search needs (Elasticsearch).

5. Define consistency guarantees per store

For feature store: online store needs read-your-writes or strong consistency for real-time features; offline can be eventual. Embedding store: eventual consistency is often acceptable, but versioning is key. Item catalog: strong consistency for updates to avoid stale menus or prices.

Key Points to Mention

  • Dual-store pattern for feature store (offline + online) and the need for point-in-time correctness for training.
  • Vector databases for embeddings and the trade-offs between approximate and exact nearest neighbor search.
  • Use of caching layers (e.g., Redis) to meet low-latency read requirements for item catalog and online features.
  • Consistency models: strong vs. eventual, read-your-writes, and how they impact user experience and model accuracy.
  • Data versioning and lineage to ensure reproducibility and handle updates without downtime.
  • Monitoring and alerting for consistency violations and latency spikes in production.

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

Q5

How do you make the system resilient to downstream failures, like the feature store or embedding service being unavailable?

System DesignTechnical Trade-offs
Author's notes

Circuit breakers, fallback to cached results, graceful degradation to non-personalized recs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that downstream failures are inevitable in production ML systems, then outline a layered resilience strategy covering fallbacks, caching, graceful degradation, and monitoring. Emphasize trade-offs between consistency, latency, and availability, and tie your answer to DoorDash's real-time, high-scale environment.

Pro tip: Quantify the impact of each failure mode (e.g., 'If the feature store is down, we fall back to precomputed features with a 5-minute staleness, which increases prediction error by only 2% but keeps the service up'). This shows you think in terms of business metrics, not just technical solutions.

1. Identify failure modes and impact

Enumerate which downstream dependencies can fail (feature store, embedding service, model server) and assess the blast radius: which predictions degrade, how often, and what the business cost is.

2. Design fallback strategies

For each dependency, define a fallback: cached or precomputed features, a simpler model, default embeddings, or a rule-based heuristic. Ensure fallbacks are tested and versioned.

3. Implement graceful degradation

Use timeouts, circuit breakers, and bulkheads to isolate failures. Serve stale or approximate results with clear metadata so downstream consumers can adjust.

4. Monitor and alert

Track fallback activation rates, latency, and prediction quality. Set up alerts for when fallbacks are triggered frequently, indicating a persistent issue.

5. Iterate and test

Regularly run chaos experiments (e.g., simulate feature store outage) to validate resilience. Use canary deployments to test new fallbacks in production.

Key Points to Mention

  • Circuit breaker pattern to prevent cascading failures
  • Caching strategies: local cache, Redis, or precomputed feature snapshots
  • Fallback models: simpler models or heuristics that don't rely on the failed service
  • Graceful degradation: returning approximate results with staleness indicators
  • Timeouts and retries with exponential backoff and jitter
  • Monitoring and alerting on fallback usage and prediction drift

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

Q6

What observability would you build into this system? What metrics, logs, and alerts matter most?

Product Analytics & MetricsSystem Design
Author's notes

Honestly the question I was least prepared for structurally.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around the three pillars of observability—metrics, logs, and alerts—and tie each to the ML system's lifecycle: data, training, deployment, and serving. Emphasize what matters most for DoorDash: real-time delivery predictions, model freshness, and business impact like delivery time accuracy.

Pro tip: Prioritize alerts by business impact and include model performance metrics like prediction drift and feature skew, not just infrastructure metrics. Mention how you'd avoid alert fatigue by setting dynamic thresholds and routing alerts to the right on-call teams.

1. Define observability goals

Start by clarifying what you want to observe: system health, model performance, and business outcomes. This ensures your observability plan is aligned with DoorDash's goals like accurate delivery time estimates.

2. Identify key metrics

List metrics across infrastructure (latency, error rates), model (prediction distribution, drift, accuracy), and business (delivery time error, order completion rate). Prioritize leading indicators like feature freshness.

3. Plan logging strategy

Describe what to log: input features, predictions, model version, and request metadata. Ensure logs are structured, sampled appropriately, and stored for debugging and auditing.

4. Design alerting

Specify alerts for critical issues: model staleness, prediction drift beyond thresholds, high latency, and data pipeline failures. Use severity levels and route to appropriate teams.

5. Iterate and refine

Explain how you'd continuously improve observability by incorporating feedback, conducting post-mortems, and adjusting thresholds as the system evolves.

Key Points to Mention

  • Model performance metrics: prediction drift, feature skew, accuracy over time
  • Data quality and pipeline monitoring: freshness, completeness, schema changes
  • System metrics: latency, throughput, error rates, resource utilization
  • Business metrics: delivery time prediction error, order fulfillment rate, customer satisfaction
  • Alerting best practices: severity levels, dynamic thresholds, on-call routing, avoiding alert fatigue
  • Logging: structured logs, sampling, storing predictions and features for debugging and retraining

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