Design Promo Code Redemption Limits Under Launch-Day Traffic
Last updated: November 29, 2026
Quick Overview
Design the service that validates and redeems Uber promo codes so that each code honors its global cap, per-user limit, and eligibility rules, even when a marketing push sends a huge burst of redemptions in minutes.
Uber
November 29, 20260
0
0 solved
Design the service that validates and redeems Uber promo codes so that each code honors its global cap, per-user limit, and eligibility rules, even when a marketing push sends a huge burst of redemptions in minutes.
Promotions are a big lever in Uber's marketplace and a target for abuse, so interviewers use this to test quota enforcement under a burst. They look for atomic counters, the difference between applying a promo and consuming it, and simple defenses against multi-account abuse.
What the Interviewer Expects
- Separate validating a code from consuming one use
- Enforce a global cap with an atomic counter or reservation
- Enforce per-user limits with a uniqueness constraint
- Release reservations when trips cancel
- Mention basic abuse signals (device, payment fingerprint)
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
- If the counter lives in Redis and Redis fails over, can you oversell the cap?
- How do you handle a rider who applies a code and then cancels the trip?
- How would you shard a single very hot code across nodes?
- How do you stop one person with ten accounts from using a one-per-user code?
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
A code like LAUNCH20 has rules: city, product, first-trip-only, expiry, global cap (say 50,000 uses), per-user limit (1). Riders apply codes to their account and the discount is consumed on a comple...
High-Level Design
- Promo service with a durable store (relational DB) for code definitions and a
redemptionstable with a unique key on(code_id, user_id)for per-user limits. - Counter: a Redis key `promo...