← DoorDash Interview Insights

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

Senior
Jun 2026

Summary

DoorDash system design round focused on a 'bootstrap API' that aggregates multiple downstream services into one composite response. The question had two distinct parts and the optimization half is where things got interesting.

Questions Asked (2)

Q1

You have an API that calls three downstream services in sequence, populating a composite response field by field. If any call or parse fails, that field is null and execution continues. How would you design a test strategy for this system?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

I went straight to unit tests per service handler with mocked downstreams, which felt solid.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's behavior: sequential calls, field-level null on failure, and continued execution. Then outline a test strategy that covers unit tests for each service call and parse, integration tests for the orchestration logic, and contract tests to ensure downstream compatibility. Emphasize testing failure modes, partial failures, and the composite response's correctness under various scenarios.

Pro tip: Highlight the importance of testing the system's resilience and observability: ensure that failures are logged with enough context to debug, and that null fields are distinguishable from valid nulls. Also, consider using consumer-driven contract tests to catch breaking changes in downstream services early.

1. Clarify requirements and failure semantics

Confirm what 'failure' means for each call (timeout, HTTP error, parse error) and how null fields should be interpreted. Understand if there are SLAs or retry policies.

2. Unit test each downstream interaction

Mock each downstream service to test the API's handling of success, failure, and malformed responses for each field independently. Verify that failures result in null fields and execution continues.

3. Integration test the orchestration logic

Test the sequence of calls with real or stubbed services to ensure the composite response is correctly assembled. Cover scenarios where one, two, or all three calls fail.

4. Contract test downstream services

Use consumer-driven contracts to verify that downstream services adhere to expected request/response formats, reducing the risk of parse failures in production.

5. Test non-functional aspects and observability

Include tests for timeouts, retries, logging, and metrics. Ensure that failures are logged with sufficient detail and that null fields are traceable to specific failures.

Key Points to Mention

  • Mocking and stubbing for unit tests to simulate downstream failures and malformed responses
  • Integration testing with partial failures to verify composite response correctness
  • Consumer-driven contract testing to prevent breaking changes in downstream services
  • Testing timeouts, retries, and circuit breakers if applicable
  • Observability: logging, metrics, and tracing to diagnose null fields
  • Edge cases: all calls fail, some calls fail, slow responses, and invalid data formats

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

Q2

How would you optimize that same bootstrap API, assuming the three downstream services are independent of each other?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Parallelizing the calls was the obvious first move and I said it immediately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Focus on parallelizing the calls to the three independent downstream services to reduce overall latency, using techniques like concurrent requests, asynchronous I/O, or fan-out/fan-in patterns. Also consider caching, connection pooling, and graceful degradation to handle failures without impacting the entire bootstrap response. Emphasize trade-offs such as increased complexity, resource usage, and error handling.

Pro tip: Mention that you would measure the actual latency distribution of each downstream call to decide whether parallelization is worth the added complexity, and consider using a timeout budget to prevent slow services from blocking the entire bootstrap.

1. Identify the bottleneck

Explain that the current bootstrap API likely calls the three services sequentially, causing latency to add up. Since they are independent, this is unnecessary.

2. Parallelize the calls

Propose making the three downstream calls concurrently using async I/O, threads, or a fan-out/fan-in pattern. This reduces total latency to the slowest call instead of the sum.

3. Handle failures gracefully

Discuss using timeouts, retries with backoff, and circuit breakers for each call. If one service fails, consider returning partial data or a degraded response instead of failing the entire bootstrap.

4. Optimize resource usage

Mention connection pooling, keep-alive, and caching to reduce overhead. Also consider limiting concurrency to avoid overwhelming downstream services or the client.

5. Measure and iterate

Emphasize the importance of monitoring latency, error rates, and resource utilization. Use A/B testing or canary deployments to validate improvements.

Key Points to Mention

  • Parallelization techniques: async/await, CompletableFuture, goroutines, or Promise.all
  • Fan-out/fan-in pattern and its implementation
  • Timeouts and deadline propagation to prevent slow services from blocking
  • Circuit breakers and fallback strategies for graceful degradation
  • Caching strategies (e.g., Redis, in-memory) for frequently accessed data
  • Connection pooling and HTTP keep-alive to reduce overhead
  • Monitoring and observability to measure impact

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