Design a Flash Sale (BFCM Scale)
Shopify runs the checkout for millions of independent merchant stores on shared infrastructure, so its single hardest engineering event is a coordinated write spike. That event has a name here: BFCM, the Black Friday and Cyber Monday weekend that is the busiest shopping stretch of the year. A flash sale, sometimes called a product drop, is the sharp version of it. One limited item, a sneaker or a console, goes live at a set minute, and a wave of shoppers all press buy at the same instant on the same product. Demand arrives faster than stock exists, and it all points at one row of inventory. That row is the whole fight.
Say the shape of the problem out loud before drawing anything. It steers every later choice. This is not a throughput problem you cache your way out of. Reads are easy to cache, but a purchase is a write, and every one of these writes competes for the same scarce resource, the last few units of a single product. Two things can go wrong. One is overselling, promising more units than exist. The other is falling over, letting the surge take down checkout for this store and its neighbors. So the design is about controlling how fast requests are allowed to touch the hot inventory, and about turning most shoppers away cheaply and fairly when the stock runs out. That framing, admission control plus write contention, is the whole round.
- 2 diagrams
- 5 sections
- about 40 min
Premium lessonShopify interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Shopify interview guideKnow what Shopify asks before you walk in.
26 coding · 5 system design · 21 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.