Start Here

Tier 1 · Building Blocks

Scale Reads

Scale Writes

Database Selection

Traffic Control

Consistency & Coordination

Estimation

Tier 2 · Core Systems

Tier 3 · Location & Real-Time

Tier 4 · Infrastructure & Data

Tier 5 · Finance & Commerce

Tier 6 · Advanced & Collaborative

Phase 1 — Clarify & Scope

Interviewer: Design an e-commerce platform like Amazon. What do you want to clarify?

Candidate: This is a massive domain — I want to understand the scope:

  1. Are we designing the full platform or a specific subsystem? I'd suggest focusing on the core: product catalog, shopping cart, order placement, and inventory management.
  2. What's the scale — users, orders per day, catalog size?
  3. First-party inventory (Amazon owns the stock) or marketplace (third-party sellers)?
  4. Are we including fulfillment/shipping, or just the order system?
  5. How critical is consistency for inventory — can we oversell (like airline overbooking), or must we be exact?

Interviewer: Full platform. Focus on product catalog + search, shopping cart, order placement, and inventory management. 300 million active users, 10 million orders per day, 500 million product SKUs. Both first-party and third-party sellers. Include inventory management. No overselling — don't show "Add to Cart" if out of stock.

Candidate: Let me size this:

Order rate=10M orders/day86,400≈116 orders/sec average\text{Order rate} = \frac{10\text{M orders/day}}{86{,}400} \approx 116 \text{ orders/sec average}

Peak orders (10× average)=1,160 orders/sec (Prime Day)\text{Peak orders (10× average)} = 1{,}160 \text{ orders/sec (Prime Day)}

Product views=300M users×20 views/day/86,400≈69,444 views/sec\text{Product views} = 300\text{M users} \times 20 \text{ views/day} / 86{,}400 \approx 69{,}444 \text{ views/sec}

Catalog size=500M SKUs\text{Catalog size} = 500\text{M SKUs}

Cart sessions: 300M users × 30% with active carts = 90M active cart sessions.

In the full tutorial

  • Phase 2 — High-Level Architecture
  • Phase 3 — Deep Dive & Evolution
  • Phase 4 — Robustness & Operations

Glossary history

Click dotted jargon to save explanations here.