Code RoomCoupon promotion engine
MediumPrep Room Coding #3679

Coupon promotion engine

System designConcurrencyMid–Senior~40 min

Design a coupon/promotion engine for an e-commerce checkout serving ~3,000 carts/sec at peak (flash sales). Promotions vary: percentage off, fixed amount, BOGO, free shipping, first-order-only, and stackable vs exclusive rules. Constraints: total redemption caps (e.g. 'first 10,000 uses') and per-user caps must be enforced exactly even under a flash-sale stampede, evaluation must add <20ms to checkout, and applying multiple eligible promos must pick the best legal combination. Read-heavy on the catalog, contended on the cap counters.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.