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 a Content Delivery Network — think Cloudflare or AWS CloudFront. What do you want to clarify?

Candidate: A few clarifying questions:

  1. What types of content — static assets (images, JS, CSS), video streaming, or dynamic API responses too?
  2. What's the geographic footprint — global, or specific regions?
  3. What's the traffic volume — requests per second and total bandwidth?
  4. Cache invalidation requirements — how quickly must content updates propagate?
  5. Do we need edge compute (running logic at the edge) or purely caching?

Interviewer: Primarily static assets and video streaming. Global footprint — 450+ Points of Presence (PoPs). Peak traffic: 10 million requests/sec, 2 Tbps bandwidth. Cache invalidation must propagate globally within 60 seconds. Edge compute is a stretch goal.

Candidate: Let me size the PoP infrastructure:

Per PoP (450 PoPs)=10M req/sec450≈22,222 req/sec average\text{Per PoP (450 PoPs)} = \frac{10\text{M req/sec}}{450} \approx 22{,}222 \text{ req/sec average}

Per PoP bandwidth=2 Tbps450≈4.4 Gbps average\text{Per PoP bandwidth} = \frac{2\text{ Tbps}}{450} \approx 4.4 \text{ Gbps average}

With typical peak-to-average ratio of 3×: each PoP must handle ~66K req/sec and ~14 Gbps at peak. A tier-1 PoP (major city) might handle 10× that — 220K req/sec.

Target cache hit rate: 90%+ (only 10% of requests reach origin):

Origin requests=10M×0.10=1M req/sec to origin\text{Origin requests} = 10\text{M} \times 0.10 = 1\text{M req/sec to origin}

Bandwidth saved=2 Tbps×0.90=1.8 Tbps\text{Bandwidth saved} = 2\text{ Tbps} \times 0.90 = 1.8 \text{ Tbps}

Interviewer: Good. What are the core requirements?

Candidate:

  • Route user requests to the nearest PoP (<…

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.