← Lessons

quiz vs the machine

Silver1060

System Design

The CDN Architecture

How a content delivery network spreads copies of content close to users.

4 min read · intro · beat Silver to climb

What a CDN is

A content delivery network is a fleet of servers spread across many locations. Instead of every user hitting your one origin server, they hit a nearby edge node that holds a cached copy of your content.

Why distance matters

Latency grows with physical distance. A user in Tokyo pulling from a server in Virginia waits on long round trips. A CDN places content in a nearby city so the response travels a short path.

The basic layers

  • Origin is your source of truth where content lives.
  • Edge nodes cache copies near users and serve most traffic.
  • DNS or anycast routing sends each user to a close, healthy edge.

What it offloads

The CDN absorbs the bulk of requests, so your origin sees far less load. It also smooths traffic spikes and shields the origin from many failures and attacks.

Key idea

A CDN serves cached copies of content from nodes near each user, cutting latency and shielding the origin from load.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the main benefit of a CDN?

2. Where does a CDN's source of truth live?