
Retail · complexity 4/5
E-commerce checkout
How an online store sells every unit once and charges every customer once — from one monolith on one Postgres, through flash sales, to an order saga across services
Two shoppers want the last pair of sneakers, and one card must be charged exactly once. See how locks, reservations, waiting rooms, idempotency keys and a saga keep a store honest at flash-sale speed.
- Conditional stock decrement
- Reservations with expiry
- Fair waiting room
- Cached catalogue
- Always-writable cart
- Authorize then capture
- Idempotency keys
- Order saga with compensations
- Transactional outbox