All problems

Flash Sale

A 100x drop-day stampede — sell out without overselling.

hard~24 min Pro Simulator · +140 ptsTheory +47 pts
The build

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 CDNServes the drop page and product assets from the edge.
  • Edge LBSpreads the stampede across the checkout fleet.
  • Checkout APIValidates carts and reads live inventory.
  • Checkout dispatchSplits validated traffic between the inventory read path and the order write path.
  • Inventory cacheKeeps stock counts in memory so reads never stampede the DB.
  • Order queueAbsorbs the order burst so writes drain at a survivable rate.
  • Order writersDrain the queue and commit orders atomically.
  • Inventory + orders DBSource 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
Base 16,000 rps45s run 4 scripted failures

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.

Pro

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
Get started