Course contentsShow
← Web Development
Lesson 2156 of 2,98239. Network PerformanceFree lesson

What is a CDN and Why Use One

Understand content delivery networks, edge servers, and how CDNs reduce latency by serving assets geographically closer to users.

What is a CDN and Why Use One

You'll learn what content delivery networks are and how they dramatically reduce load times by bringing your content closer to users worldwide.

Understanding CDNs

A Content Delivery Network (CDN) is a geographically distributed network of servers that work together to deliver web content quickly. Instead of every user requesting files from your single origin server (wherever it's physically located), a CDN stores copies of your static assets—like images, CSS, JavaScript, fonts, and videos—on multiple servers around the world.

Think of it like having franchise stores instead of one central warehouse. If you're in Seattle and need to buy something, would you rather drive to a local store or fly to New York where the company's headquarters is? The local store gets you what you need much faster.

How CDNs Reduce Latency

When a user requests your website, the CDN automatically routes them to the nearest edge server—a server physically close to them. This proximity dramatically reduces latency (the time data takes to travel across the network).

For example, if your origin server is in Virginia but a user visits from Tokyo, without a CDN their request travels thousands of miles. With a CDN, they hit an edge server in Tokyo or nearby, cutting response times from hundreds of milliseconds to tens.

Why Use a CDN?

  • Faster load times: Assets arrive quicker from nearby servers
  • Reduced bandwidth costs: Your origin server handles fewer requests
  • Better global reach: Equal performance for users worldwide
  • Improved reliability: If one edge server fails, requests route to another
  • Offloaded traffic: Your server focuses on dynamic content while the CDN handles static assets

Key Takeaway: CDNs distribute your content across global edge servers, dramatically reducing latency by serving assets from locations geographically closer to each user.