Top 3 Oversell Interview Questions
Browse 3 real-world technical and behavioral interview questions about Oversell. Review scenarios, edge cases, and architectural best practices.
A flash sale decrements stock from many threads. Do you go optimistic or pessimistic, and how do you prove nothing oversold?
For one stock counter, optimistic locking with a compare-and-set loop fits: read, refuse at zero, and publish the decrement only if nobody changed the value meanwhile. A lock suits a larger critical section. Prove it by arguing each sale consumes one unit, plus a stress test seen to fail on the broken code.
A flash sale oversold three hundred units and the stock ledger never went negative. How is that possible, and where do you look first?
The oversell sits in accepted orders, not in on-hand stock. The checkout gate read a cached availability projection while orders arrived faster than it refreshed, so the promise ledger went negative and the stock ledger never had to. You fix the gate, not the cache.
Two customers try to buy the last item at the same time. How do you handle inventory?
Treat availability as a claim you grant, not a number you read: fold the check and the decrement into one conditional write, hold the winner's claim as a reservation that expires, and choose deliberately how much overselling you accept, because the warehouse and not the database is the real source of truth.