Code Room
System designMedium
Question
Design a stored-value / gift-card platform for a large retailer: ~100M active cards, peak ~6,000 redemptions/sec at checkout. Cards have a balance, can be partially redeemed across many purchases, can be reloaded, and some balances expire on a schedule (oldest-funds-first). A redemption at the POS must be fast and must never let two terminals double-spend the same card. Describe the model, the expiry handling, and how you prevent double-spend under concurrent redemptions.
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.