Flash Sale
A 100x drop-day stampede — sell out without overselling.
Survive a 100× drop-day stampede without overselling inventory or melting the checkout path.
A flash sale compresses a month of demand into one minute. The drop page must live at the edge, inventory reads must come from a cache, and orders must flow through a queue to a worker fleet — because the instant the drop goes live, anything that touches the database synchronously dies first.
Components in play
- Drop-page CDN — Serves the drop page and product assets from the edge.
- Edge LB — Spreads the stampede across the checkout fleet.
- Checkout API — Validates carts and reads live inventory.
- Checkout dispatch — Splits validated traffic between the inventory read path and the order write path.
- Inventory cache — Keeps stock counts in memory so reads never stampede the DB.
- Order queue — Absorbs the order burst so writes drain at a survivable rate.
- Order writers — Drain the queue and commit orders atomically.
- Inventory + orders DB — Source of truth for stock counts and orders.
Graded on these SLOs
- ≥ 99.00%Checkouts succeed
- ≤ 95 msCheckout p99
- ≥ 22k rpsSell through the drop
- ≤ 80%Fleet headroom
- ≤ 12Lean footprint
The brief
Design the checkout path for a flash sale: a limited-inventory drop that compresses a month of demand into one minute. Shoppers hammer the drop page and stock reads the instant it opens, and orders must never oversell — so almost nothing in the hot path can touch the database synchronously.
Functional
- Show the drop page and live stock counts
- Accept an order and decrement inventory exactly once per unit
- Confirm or reject the order without overselling
Non-functional
- ~100x normal traffic arrives in the same few seconds the drop opens
- Inventory must never go negative, even under contention
- Checkout stays responsive through the spike, not just eventually consistent
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard