Design Per-Partner Quota Enforcement for the Drive Delivery API
Last updated: November 29, 2026
Quick Overview
DoorDash Drive lets other businesses request deliveries through an API. Design the system that enforces per-partner request quotas and delivery-creation limits so one large partner cannot starve others or overload dispatch during a lunch spike.
DoorDash
November 29, 20260
0
0 solved
DoorDash Drive lets other businesses request deliveries through an API. Design the system that enforces per-partner request quotas and delivery-creation limits so one large partner cannot starve others or overload dispatch during a lunch spike.
Drive is DoorDash's white-label logistics product, so its public API faces many partners with very different traffic. The interviewer wants a rate-limiting design tied to business contracts (tiers, burst allowances, per-market capacity), not a generic token bucket recited from memory.
What the Interviewer Expects
- Distinguish request-rate limits from business quotas like deliveries per day
- Pick an algorithm and storage for distributed counters
- Describe where enforcement runs and its latency cost
- Return clear errors and headers partners can act on
- Protect downstream dispatch capacity per market
- Handle limiter store outages safely
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you let a partner exceed quota for a planned promotion?
- Should the limiter fail open or closed, and does the answer differ by endpoint?
- How would you detect a partner whose retry loop is amplifying load?
- How do you bill overage if quotas are soft?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Partners authenticate with API keys. Each partner has a contract tier defining requests per second (for quotes, status calls) and delivery creations per minute and per day.
- Some limits are per mar...
High-Level Design
- Requests hit the API gateway, which authenticates and resolves the partner ID and tier from a cached config service.
- A limiter library in the gateway checks counters in a regional Redis cluster....