Course contentsShow
← System Design
Lesson 170 of 1,9195. Content Delivery NetworksFree lesson

CDN Architecture: Edge Servers and Origin

The basic CDN topology with origin servers holding source content and edge servers caching near users.

CDN Architecture: Edge Servers and Origin

You'll learn: How CDNs organize themselves into origin servers that hold master content and edge servers that cache copies closer to users.

The Basic CDN Topology

A CDN operates with two types of servers working together:

Origin servers are your application's home base—they hold the original, authoritative version of your content (images, videos, JavaScript files, etc.). Think of the origin as the central warehouse where all products are stored.

Edge servers are distributed caching nodes deployed in many geographic locations around the world. They store copies of your content and sit physically closer to end users. These are like neighborhood stores that stock popular items from the warehouse.

How They Work Together

When a user requests content:

  1. The request first goes to the nearest edge server
  2. If the edge has a cached copy (a "cache hit"), it returns the content immediately
  3. If not (a "cache miss"), the edge server fetches it from the origin, caches it locally, then serves it to the user
  4. Future requests for that content can be served from the edge cache

This topology means your origin server doesn't get overwhelmed—edge servers handle most traffic. Users get faster responses because they're served from geographically nearby locations instead of making round trips to your centralized origin.

The Analogy

Imagine a library system: the main library (origin) has every book, but branch libraries (edges) keep copies of popular titles. You visit your local branch first, and only if they don't have the book do they request it from the main library.

Key Takeaway: CDN architecture uses origin servers as the source of truth and edge servers as distributed caches that bring content closer to users, reducing latency and origin load.