Scenario: a flash sale brings 10,000 requests a second
An online store’s traffic is usually a fiftieth of what it’s about to get. At noon a flash sale opens on 5,000 discounted phones and traffic jumps to 10,000 requests a second for 30 minutes. Every shopper must get an answer, not one phone may be oversold, and the rest of the store must keep working.
Functional requirements
- View the sale page with the stock remaining
- Try to buy one phone
- Find out whether the purchase succeeded
- Normal shopping carries on during the sale
Non-functional requirements
- Every request gets a response within 1 second, even if the answer is “sold out” or “please wait”
- Exactly 5,000 phones sold, never more
- Pay for extra servers only around the sale
Scale
- 10,000 requests a second at the peak, about 50 times normal
- About 90% of sale traffic is page views and stock checks
- 500,000 shoppers chasing 5,000 phones
How you’ll be scored
10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works
What interviewers look for
- Clarify before you draw. State what is in and out of scope. For “Scenario: a flash sale brings 10,000 requests a second”, that starts with: View the sale page with the stock remaining; Try to buy one phone; Find out whether the purchase succeeded. Interviewers notice candidates who pin the requirements down first.
- Turn the scale into numbers. The scale (10,000 requests a second at the peak, about 50 times normal; About 90% of sale traffic is page views and stock checks; 500,000 shoppers chasing 5,000 phones) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
- Show how each quality is met. Your design should visibly deliver: Every request gets a response within 1 second, even if the answer is “sold out” or “please wait”; Exactly 5,000 phones sold, never more; Pay for extra servers only around the sale. Saying that it does isn’t enough; point to the part of the design that makes it true.
- Expect follow-ups on the hard parts. Interviewers usually probe scenario, traffic spikes and inventory here. This is a hard problem, so interviewers expect depth: what breaks first at this scale, how each failure is contained, and which trade-offs you accepted on purpose.
- Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.