Flash-sale inventory overselling prevention
An inventory service for a flash-sale platform must guarantee a unit of a limited-stock SKU is sold at most once across 60 app servers in two regions. The team currently uses a Redis distributed lock (single-node SETNX with TTL) around the decrement. Under load they occasionally oversell. Redesign the locking/coordination so overselling is impossible, and explain precisely why the current scheme fails.
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
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.