Design Inventory Reservation For A Mega Sale Midnight Spike
Last updated: November 29, 2026
Quick Overview
Design the order placement and inventory reservation path for a marketplace sale that opens at midnight, where traffic jumps 20x within minutes, thousands of small suppliers each hold limited stock, and the system must never oversell while keeping checkout fast.
Meesho
November 29, 20260
0
0 solved
Design the order placement and inventory reservation path for a marketplace sale that opens at midnight, where traffic jumps 20x within minutes, thousands of small suppliers each hold limited stock, and the system must never oversell while keeping checkout fast.
Meesho's big festive sales create sharp midnight spikes on low-priced, low-stock items from small suppliers, and overselling means cancellations that hurt trust with first-time online buyers. The interviewer probes hot-key contention, reservation expiry, the payment and COD split, and how the design degrades rather than falls over.
What the Interviewer Expects
- Separates a fast reservation step from durable order creation
- Handles hot SKUs with atomic decrements and sharded or bucketed stock
- Uses reservations with TTL that release on payment failure or timeout
- Treats COD and prepaid flows differently
- Plans load shedding, queues and pre-warming for the spike
- Reconciles cache counters with the source of truth
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- One SKU gets 50,000 add-to-cart attempts per second. What exactly happens on that key?
- A supplier edits stock in their panel during the sale. How is that merged?
- How do you prove there was no oversell after the event?
- Which parts would you turn off first under overload?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: show available stock, reserve on checkout, confirm on payment success or COD placement, release on failure or timeout, let suppliers update stock. Non-functional: zero oversell, checkout p...
High-Level Design
- Stock service: source of truth in a relational store (
sku_id, on_hand, reserved), plus a Redis counter per SKU holdingavailableloaded before the sale. - Reservation: a Lua script does ...