Lesson 14 of 16
42. Design E-commerce Cart and Checkout (Amazon / Flipkart)

Variations to practise

3 min read+10 XP

Chapters used

Approach (1), Estimation (2), Consistency (16), Transactions, locking and sagas (17), Message queues (22), Pub/sub and outbox (23), APIs, idempotency and webhooks (24), Rate limiting (25), Failures (29), Notifications (33), Flash sales (43).

Try these variations

Each is a common follow-up. Answer in two minutes, then check the sketch.

  1. "Items come from three warehouses." → Reserve per warehouse; the order splits into shipments; the saga releases each hold separately on failure.
  2. "Add a wallet plus card split payment." → Two payment steps in the saga: debit wallet, charge card; on card failure, refund the wallet.
  3. "Price drops after the order." → A separate price-protection job that issues credits; never edit the order's price_paid.
  4. "Sale day: 10× normal traffic." → Pre-scale (Chapter 41), bucket hot stock, waiting room for the flash items (Chapter 43), and a second payment gateway.