← DoorDash Interview Insights

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

SeniorPrefer not to say
Jun 2026Remote

Summary

DoorDash system design round, went pretty deep on a donation/charity campaign platform. The scope was bigger than I expected and I spent too long on the happy path before they pushed me on failure modes.

Questions Asked (5)

Q1

Design a time-bounded donation drive system that accepts donations from many concurrent users, tracks running campaign totals, and triggers matching or bonus rules when thresholds are hit.

System DesignTechnical Trade-offs
Author's notes

I started with the campaign lifecycle (create, start, end, payout) which felt natural, but I glossed over the matching rules too fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, consistency, latency, matching rules) and then design a scalable, fault-tolerant system with idempotent donation processing, real-time aggregation, and reliable threshold detection. Focus on trade-offs between consistency and availability, and explain how you would handle concurrency, exactly-once semantics, and rule evaluation.

Pro tip: Emphasize idempotency and exactly-once processing for donations to avoid double-counting, and discuss how you would handle late-arriving data or out-of-order events in threshold detection.

1. Clarify Requirements and Constraints

Ask about scale (donations per second, total users), consistency needs (strong vs eventual), latency for total updates, and matching rules (e.g., company matches 1:1 up to $10k). Also clarify time bounds (campaign duration) and failure tolerance.

2. High-Level Architecture

Propose a microservices-based architecture with an API gateway, donation service, and a streaming pipeline (e.g., Kafka) for event processing. Use a distributed database (e.g., Cassandra) for donations and a fast in-memory store (e.g., Redis) for running totals.

3. Concurrency and Idempotency

Ensure each donation is processed exactly once using idempotency keys and deduplication. Use optimistic concurrency or distributed locks for updating totals, and consider partitioning by campaign ID to scale.

4. Threshold Detection and Matching Rules

Design a rule engine that evaluates matching rules when thresholds are hit. Use a stream processor (e.g., Flink) to detect thresholds in real-time, and trigger matching donations via a separate service, ensuring atomicity or compensating transactions.

5. Trade-offs and Failure Handling

Discuss trade-offs: strong consistency vs availability, latency vs accuracy, and cost. Explain how to handle failures (retries, dead-letter queues) and ensure the system is resilient and scalable.

Key Points to Mention

  • Idempotency and exactly-once processing for donations to prevent double-counting
  • Use of event streaming (Kafka) and stream processing (Flink) for real-time aggregation and threshold detection
  • Data partitioning and sharding strategies to handle high concurrency and scale
  • Trade-offs between strong consistency (e.g., using transactions) and eventual consistency (e.g., using CRDTs or gossip protocols)
  • Handling of matching rules: atomicity, compensating transactions, and idempotent matching
  • Monitoring, alerting, and observability for campaign totals and rule triggers

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

Q2

How do you handle idempotency and exactly-once semantics for payment processing when users might retry a failed donation?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This is where I felt most confident.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: idempotency ensures retries don't create duplicate charges, while exactly-once semantics guarantee each donation is processed exactly once. Then propose a solution using idempotency keys, a state machine for payment status, and reconciliation with the payment provider to handle edge cases.

Pro tip: Emphasize that exactly-once is often achieved through at-least-once delivery plus idempotent processing, and discuss how you'd handle partial failures and timeouts with the payment gateway.

1. Clarify Requirements and Constraints

Define what idempotency and exactly-once mean in this context, and identify potential failure points such as network retries, user double-clicks, and gateway timeouts.

2. Design Idempotent API

Use client-generated idempotency keys (e.g., UUID) for each donation attempt, and store them server-side with a unique constraint to detect and reject duplicates.

3. Implement State Machine and Transaction Log

Model payment states (e.g., PENDING, SUCCESS, FAILED) and persist transitions atomically. Use a transaction log to record each attempt and its outcome.

4. Handle Retries and Reconciliation

On retry, check the idempotency key and return the stored result if already processed. Periodically reconcile with the payment provider to resolve inconsistencies.

5. Discuss Trade-offs and Edge Cases

Address trade-offs like storage overhead for idempotency keys, latency vs. consistency, and how to handle expired keys or partial failures.

Key Points to Mention

  • Idempotency keys: client-generated unique identifiers for each donation attempt.
  • Database unique constraints to enforce idempotency and prevent duplicate records.
  • State machine for payment status (e.g., PENDING, SUCCESS, FAILED) with atomic transitions.
  • Exactly-once semantics achieved via at-least-once delivery + idempotent processing.
  • Reconciliation with payment provider to handle timeouts and ambiguous responses.
  • Trade-offs: storage cost, key expiration, and impact on latency.

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

Q3

Walk through your approach to handling high availability and traffic spikes during a viral campaign moment.

System DesignTechnical Trade-offs
Author's notes

Blanked for a second on this one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem around DoorDash's three-sided marketplace (customers, dashers, merchants) and the need to maintain availability during unpredictable traffic spikes. Walk through a layered defense: capacity planning, auto-scaling, graceful degradation, and real-time monitoring, while emphasizing trade-offs between consistency and availability. Conclude with a concrete example or lessons learned to show practical experience.

Pro tip: Tie your answer to DoorDash's specific architecture (e.g., microservices, Kafka, Redis) and business metrics like order completion rate and dasher utilization. Show that you prioritize user experience and revenue impact, not just technical uptime.

1. Clarify Requirements and Scale

Ask about expected traffic volume, peak multipliers, latency SLOs, and critical user journeys (e.g., order placement, dasher assignment). Establish what 'high availability' means for this campaign (e.g., 99.99% uptime).

2. Design for Scalability and Redundancy

Propose horizontal scaling with auto-scaling groups, multi-AZ deployments, and load balancing. Mention caching (Redis), CDN for static assets, and database read replicas to handle read-heavy traffic.

3. Implement Graceful Degradation and Circuit Breakers

Describe fallbacks like serving cached or stale data, disabling non-critical features (e.g., recommendations), and using circuit breakers to prevent cascading failures. Prioritize core ordering flow.

4. Monitor, Alert, and Auto-Remediate

Set up real-time monitoring (Prometheus, Grafana) with alerts on key metrics (latency, error rates, queue depths). Use auto-remediation like scaling policies and automated rollbacks.

5. Test and Iterate

Conduct load testing and game days to simulate spikes. Post-campaign, review metrics and conduct a blameless post-mortem to improve future readiness.

Key Points to Mention

  • Auto-scaling and horizontal scaling strategies (e.g., Kubernetes HPA, AWS Auto Scaling)
  • Caching layers (Redis, CDN) and database read replicas to reduce load
  • Graceful degradation and feature flags to disable non-critical services
  • Circuit breakers and bulkheads to isolate failures
  • Real-time monitoring and alerting with SLOs/SLIs
  • Trade-offs between consistency and availability (CAP theorem) and business impact

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

Q4

How would you design the async messaging and fan-out for notifications like donor receipts, charity updates, and matching alerts?

System DesignAPI & Integrations
Author's notes

Pretty comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: notification types, volume, latency, and delivery guarantees. Then propose an event-driven architecture with a message queue (e.g., Kafka) for ingestion, a fan-out service to route to appropriate channels (email, push, SMS), and a scalable worker pool for delivery. Emphasize idempotency, retries, and dead-letter queues for reliability.

Pro tip: Mention the importance of idempotent consumers and deduplication to handle at-least-once delivery, and suggest using a priority queue for time-sensitive alerts like matching alerts. Also, highlight the need for monitoring and alerting on queue depth and delivery failures.

1. Clarify Requirements

Ask about notification types, expected volume, latency requirements, delivery guarantees (at-least-once vs exactly-once), and user preferences. This scopes the design.

2. High-Level Architecture

Propose an event-driven pipeline: producers publish events to a message broker (e.g., Kafka), a fan-out service consumes and routes to channel-specific queues, and workers handle delivery. Include a database for tracking notification status.

3. Fan-Out and Routing

Design a fan-out service that determines recipients and channels based on event type and user preferences. Use a publish-subscribe model with topics per notification type or per channel.

4. Reliability and Scalability

Ensure idempotency with deduplication keys, implement retries with exponential backoff, and use dead-letter queues for failed messages. Scale workers horizontally and use partitioning for parallel processing.

5. Monitoring and Observability

Add metrics for queue depth, processing latency, success/failure rates, and alerting. Log notification attempts for auditing and debugging.

Key Points to Mention

  • Use of message queue (e.g., Kafka, RabbitMQ) for decoupling and buffering
  • Idempotent consumers and deduplication to handle duplicate messages
  • Priority queues for time-sensitive notifications like matching alerts
  • Retry mechanisms with exponential backoff and dead-letter queues
  • User preference management and channel selection (email, push, SMS)
  • Monitoring and alerting on queue depth and delivery failures

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

Q5

How do you ensure correctness in money math across the system, and what does your reconciliation process look like?

System DesignData Modeling
Author's notes

Used integer cents everywhere, no floats, which I said immediately and they nodded.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how you represent and compute money using integer minor units and a consistent rounding strategy, then describe how you enforce correctness through validation, idempotency, and immutable ledgers. Finally, walk through your reconciliation process: comparing internal records against external sources, detecting discrepancies, and resolving them with automated and manual workflows.

Pro tip: Emphasize that reconciliation is not just a batch job but a continuous, automated process with alerting and a clear ownership model. Mention that you treat money as a first-class domain concept with strict invariants and audit trails, which shows maturity beyond just coding.

1. Representation and Computation

Explain that you store money as integers in the smallest currency unit (e.g., cents) and use a consistent rounding rule (e.g., half-up) for any division or percentage calculations. Avoid floating-point entirely.

2. Validation and Invariants

Describe how you enforce invariants at the domain layer, such as debits equaling credits in a transaction, and validate all inputs and outputs. Use database constraints and application-level checks.

3. Idempotency and Auditability

Highlight the use of idempotency keys for payment operations and an append-only ledger to record every money movement. This ensures that retries don't double-charge and provides a full audit trail.

4. Reconciliation Process

Outline a scheduled reconciliation job that compares internal ledger balances against external sources (e.g., payment processor reports, bank statements). Automatically flag mismatches and route them for investigation.

5. Discrepancy Resolution and Monitoring

Explain how you handle discrepancies: automated retries, manual review queues, and root-cause analysis. Set up alerts for reconciliation failures and track metrics like reconciliation rate and time-to-resolve.

Key Points to Mention

  • Use of integer minor units (e.g., cents) and avoiding floating-point arithmetic
  • Consistent rounding strategy and handling of fractional cents
  • Double-entry bookkeeping and immutable ledger for auditability
  • Idempotency keys to prevent duplicate transactions
  • Automated reconciliation against external sources with alerting
  • Handling of edge cases like refunds, chargebacks, and currency conversion

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