Preparing your design workspace

Loading the problem and your latest saved attempt…

Design High-Demand Commerce and Fulfillment

Design a physical-goods purchase and fulfillment platform that stays correct and usable during sudden demand spikes.

Problem statement

For this exercise, assume a single retailer sells limited physical products. A customer can browse an approximately current catalog, obtain a versioned price and availability quote, submit checkout, reserve inventory, authorize payment, receive one durable order, and track warehouse assignment and shipment.

Product launches can cause abrupt hot-item demand spikes that are far larger than normal traffic. The service must shed or queue excess work explicitly, remain fair enough that one client cannot monopolize admission, and never confirm stock it did not reserve or charge the same logical checkout twice.

Inventory, payment, and warehouse systems can time out after accepting a request. Treat those outcomes as pending until reconciliation proves what happened. One order may split across fulfillment sites, while each physical unit can back at most one active reservation or confirmed order.

Cancellation is allowed only while the affected work remains reversible. Subscription billing, product activation, returns, carrier-internal routing, and warehouse robotics are outside scope.

What to build

  1. Customers can browse products and obtain an explicitly versioned price and availability quote before checkout.
  2. Customers can submit checkout idempotently and receive one accepted, rejected, or pending outcome while inventory and payment are coordinated without overselling or double charging.
  3. The platform assigns confirmed items to fulfillment sites, tracks split shipments, and exposes a monotonic customer-visible order history.
  4. The platform admits hot-item demand through bounded, observable overload controls and reconciles uncertain inventory, payment, and fulfillment outcomes.

At scale

  • For this exercise, assume 10 million catalog views and 250,000 completed orders on a normal day, with ordinary peaks of 2,000 checkout attempts per second.
  • For this exercise, assume a launch can drive 50,000 checkout attempts per second toward a small set of SKUs for fifteen minutes; admission must stay bounded and must not oversell a unit.
  • For this exercise, target 300 milliseconds p99 for cached catalog reads, two seconds p95 for a healthy admitted checkout to return accepted or explicitly pending, and five seconds for committed order-state changes to become visible.
  • For this exercise, acknowledged checkout transitions must survive one process or availability-zone loss, idempotency and financial evidence must outlive all client and provider retries, and fulfillment history must remain auditable for one year.