← DoorDash Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

DoorDash MLE system design round focused on ads infrastructure end to end. No ML theory, just backend architecture for the whole ads pipeline, which was a nice change from the usual.

Questions Asked (1)

Q1

Design an ads recommendation and serving system, focusing on the backend infrastructure rather than the ML model itself. Cover ad ingestion, candidate retrieval, ranking, serving top-N ads, click and impression tracking, budget pacing, and the components that support all of this at scale.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is a big question and I underestimated how much ground it covers.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, ad types, budget constraints) and then walk through the end-to-end pipeline: ad ingestion, candidate retrieval, ranking, serving, and feedback loops. Emphasize the backend infrastructure, including data stores, streaming, and budget pacing, while discussing trade-offs and scalability.

Pro tip: Show awareness of the ML lifecycle by explaining how the serving system integrates with model updates and how feedback data is used for retraining, without diving into model architecture. Also, highlight the importance of low-latency serving and real-time budget pacing as key challenges.

1. Clarify Requirements and Scope

Ask questions to understand scale (QPS, number of ads), latency requirements, ad types (e.g., sponsored listings), budget constraints, and targeting criteria. Define functional and non-functional requirements.

2. Design Ad Ingestion and Indexing

Outline how ads are ingested from advertisers, validated, and stored in a low-latency store (e.g., inverted index, key-value store). Discuss data freshness and update mechanisms.

3. Design Candidate Retrieval and Ranking

Explain how to retrieve a set of candidate ads based on targeting (e.g., location, user segment) using an index, then rank them using a scoring model. Focus on the serving infrastructure for low-latency retrieval and ranking.

4. Design Serving and Feedback Loop

Describe how top-N ads are served to the user, including real-time budget pacing and frequency capping. Detail how impressions and clicks are tracked via logging and stream processing for near real-time feedback.

5. Address Scalability and Trade-offs

Discuss scaling components (sharding, replication, caching), trade-offs between latency and freshness, and how to handle failures. Mention monitoring and A/B testing infrastructure.

Key Points to Mention

  • Ad ingestion pipeline: validation, deduplication, and storage in a low-latency index (e.g., Elasticsearch, custom inverted index).
  • Candidate retrieval: using targeting criteria to fetch relevant ads efficiently, possibly with a two-stage retrieval (coarse then fine).
  • Ranking service: low-latency scoring using precomputed features or lightweight models, with a focus on infrastructure (e.g., feature store, model serving).
  • Budget pacing: real-time tracking of ad spend and adjusting serving to meet budget constraints, using counters and rate limiting.
  • Click and impression tracking: logging events to a stream (e.g., Kafka) and processing for real-time metrics and feedback.
  • Scalability and reliability: sharding, replication, caching, and fallback mechanisms to handle high QPS and ensure low latency.

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