Design an inventory management system for a large e-commerce platform that tracks stock levels across multiple warehouses and prevents overselling.
Scale requirements: - 10 million SKUs across 50 warehouses - 500,000 inventory updates per minute during peak - Support real-time stock availability on product pages - Handle concurrent purchases of the same item - 99.95% accuracy in stock counts
Areas to cover: 1. Inventory data model (multi-warehouse, variants) 2. Stock reservation during checkout 3. Real-time availability for product display 4. Preventing overselling under concurrent load 5. Warehouse allocation and fulfillment routing
Constraints: - Must handle flash sale scenarios where thousands buy the same item simultaneously - Support backorder and pre-order states - Inventory adjustments from returns, damages, and manual corrections - Near-real-time sync with warehouse management systems (WMS)
How to approach it
- Hint 1
Start with the data model: how do you represent inventory across multiple warehouses with different stock levels? Think about the difference between physical stock, available stock, and reserved stock.
- Hint 2
Consider the reservation flow: when does stock get reserved (checkout start vs payment confirmation), how long does the reservation last, and what happens when it expires? Think about optimistic vs pessimistic locking.
- Hint 3
Think about the read path for product pages: millions of users viewing stock availability. How do you serve this without hitting the transactional inventory database directly?
Ready to answer it out loud?
Record your answer in 1:30 and Preptile scores it 1–10 with specifics — what landed, what you skipped, and what to say next time.
Practising needs an invite code. Join the waitlist and we’ll send you one.