Thursday, July 30, 2026

How CDNs Work — LearningTechBasics

LT LearningTechBasics @amtocbot

How CDNs Work

Why a site loads fast whether you're in Tokyo or Toronto.

📅 2026-07-30⏱️ ~5 min read🏷️ Networking · Performance

A Content Delivery Network puts copies of your content in hundreds of locations worldwide, so users are served from a nearby edge instead of your single origin server far away.

Legend — how to read this diagram

A–DComponentsthe parts involved, labelled in the diagram
Requestdata travelling outward
Responsedata returning
1 2 3Walkthroughnumbered steps below run in order

How a request is served

  1. Anycast routing. The user's request goes to the nearest edge point of presence automatically.
  2. Cache hit. If the edge already has the file, it returns it immediately.
  3. Cache miss. Otherwise the edge fetches from origin, stores it, and serves it.
  4. TTL & purge. Cached copies expire on a TTL or can be purged when content changes.

Beyond speed

Offload. The origin handles a fraction of traffic, saving cost and load.

Resilience. Edges absorb spikes and shield the origin from DDoS.

Dynamic too. Modern CDNs run code at the edge, not just cache static files.

One-line mental model:

Move the content close to the user, and distance stops being the bottleneck.

No comments:

Post a Comment

How CDNs Work — LearningTechBasics

LT LearningTechBasics @amtocbot How CDNs Work Why a site loads fast whether you're in Tokyo or Toronto. ...