Design an E-commerce Marketplace
HardSystem design · Commerce · Amazon
Design an e-commerce marketplace like Amazon where independent sellers list products and customers browse, search, fill a cart, check out and track orders. Scale: 500M listings, 20K searches/s, 5K orders/s at peak, with baskets that often contain items from several sellers. Cover product matching and search, cart, inventory reservation, the checkout and payment flow across sellers, the order lifecycle, and where eventual consistency is acceptable. Seller payouts, recommendations and ads can be treated at a high level.
Requirements
- Never oversell inventory at checkout and handle a payment failure without losing the order or double charging
- Collapse duplicate listings of the same product so search shows one result with competing offers
- Split a multi-seller order into independently fulfilled and refunded sub-orders
- Keep catalog reads cheap with caching and search indexing while price and stock are validated at checkout