A flash sale system enables e-commerce platforms to sell limited inventory at discounted prices during a short time window, typically lasting minutes to hours.
Loading simulation...
The core challenge is handling extreme traffic spikes where millions of users compete for a few thousand items simultaneously. Unlike regular e-commerce, flash sales create a thundering herd problem where traffic can spike 100x or more within seconds of the sale starting.
Popular Examples: Amazon Lightning Deals, Flipkart Big Billion Days, Alibaba Singles' Day
In this chapter, we will explore the high-level design of a flash sale system.
This system design problem tests your ability to handle extreme concurrency, prevent overselling, ensure fairness, and maintain system stability under load.
Lets start by clarifying the requirements: