Design Promo Code Redemption with Per-User and Global Limits
Last updated: November 29, 2026
Quick Overview
Design the service that validates and redeems DoorDash promo codes such as '20% off your first 3 orders, up to 10,000 total redemptions', enforcing per-user limits and a global budget even under heavy concurrent use.
DoorDash
November 29, 20260
0
0 solved
Design the service that validates and redeems DoorDash promo codes such as '20% off your first 3 orders, up to 10,000 total redemptions', enforcing per-user limits and a global budget even under heavy concurrent use.
Promotions are a major lever for DoorDash growth teams, and leaked codes can be shared widely within minutes, so limits must hold. This scoped design tests counters, atomic reservations and the difference between applying a promo in the cart and consuming it at checkout.
What the Interviewer Expects
- Model promo rules separately from redemptions
- Reserve on checkout and confirm or release on order outcome
- Enforce per-user and global counts atomically
- Prevent abuse via multiple accounts
- Keep cart preview fast without consuming budget
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 handle a global limit of 10,000 when 50,000 people check out in the same minute?
- How do you release a redemption when an order is cancelled after delivery starts?
- How would you detect one person using many accounts?
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
- Promos have rules: eligible users (new customers, DashPass), stores, minimum subtotal, discount type, per-user limit, global limit, start and end.
- Cart page shows the discount (preview). Checkout ...
High-Level Design
- Promo service: rules table, plus
redemption(promo_id, user_id, order_id, state)where state is RESERVED, CONFIRMED or RELEASED. - Counters:
promo_usage(promo_id, count)row and per-user ...