Problems / Design a product, hard

Build Amazon checkout and flash sale

Design Amazon’s cart and checkout from an empty canvas: fast product pages, carts that survive, and a checkout that charges once and never loses an order, through a flash sale.

Unlock it once for 25 credits; everything inside it is free (runs, changes, Submit, results, hints). Sign in with Google to start; new accounts get free credits.

What it must do

Scale

Request types to route: browse (70%, read), cart (27%, write), checkout (3%, write). Budget: $88,000 a month.

Estimate first

The test cases

You start from an empty canvas. When you run the tests, each one simulates your design with its own traffic and failures:

TestWhat it doesPasses when
Normal dayThe normal day: the traffic in the brief, nothing broken. While this test runs, brokers redeliver unacknowledged messages after 5 s and 0.2% of acknowledgements are lost, as in production: only idempotent consumers avoid duplicates.Success ≥ 99%; p99 latency ≤ 300 ms (browse); p99 latency ≤ 300 ms (cart); p99 latency ≤ 3.0 s (checkout); No duplicate side effects
A flash saleAt 5 s a Lightning Deal goes live: traffic jumps to 4× for 8 s.Success ≥ 99% (checkout); Success ≥ 99% (cart); Success ≥ 99% (browse); p99 latency ≤ 600 ms (browse)
The order queue goes downAt 5 s the first event stream or queue on the request path crashes; it comes back after its restart time (10 s unless you set one).No lost events; Success ≥ 99% (checkout)
A server diesAt 4 s one server of the first app service on the request path dies for 10 s.Success ≥ 99%
Budget: $88,000/monthThe normal day's design must cost at most $88,000 a month.Cost ≤ $88,000/month

Must include

More design a product problems