Interview practice question
Preventing overselling across services
Backend Engineering · Microservices · Experienced
During flash sales, your order and inventory services sometimes sell more items than are in stock. How would you design a reliable reservation flow?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Inventory service owns stock, atomic decrement.
- Reserve before payment with expiry.
- Conditional update (stock >= qty).
- Saga: confirm or release.
- Hot items: sharded counters or queueing.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.