Course contentsShow
← System Design
Lesson 1609 of 1,91939. Real-World System: Image and Video HostingFree lesson

Why CDNs Are Essential for Media Hosting

How CDNs reduce latency, bandwidth costs, and origin load for image and video delivery at scale.

Why CDNs Are Essential for Media Hosting

You'll learn: How Content Delivery Networks solve the three critical challenges of serving images and videos at global scale: latency, bandwidth costs, and origin server load.

The Core Problem

When users across the world request your media files, serving everything from your origin servers creates three major bottlenecks:

  1. High latency — A user in Tokyo requesting a video from your Virginia data center faces network round-trip delays of 150-200ms
  2. Expensive bandwidth — Every gigabyte served directly from your origin incurs cloud egress fees (often 0.08−0.08-0.12/GB)
  3. Origin overload — Millions of requests for popular media crush your origin infrastructure

How CDNs Solve This

A CDN is essentially a globally distributed cache network. Think of it as opening thousands of local video rental stores instead of shipping DVDs from one central warehouse.

Latency reduction: CDN edge servers sit geographically close to users. That Tokyo user now fetches from a Tokyo edge server (5-10ms latency instead of 200ms). For video streaming, this means faster startup times and fewer buffering events.

Bandwidth cost savings: Once cached at the edge, the same file serves millions of users without touching your origin. You pay CDN rates (often 0.02−0.02-0.04/GB) instead of origin egress fees, and the CDN absorbs the traffic spike.

Origin offloading: A viral video might generate 10 million requests, but your origin only serves it once per CDN edge location (typically 200-300 globally). The CDN handles the remaining 99.99% of requests.

Cache hit ratios of 90-95% are common for media content, meaning only 5-10% of requests ever reach your origin.

Key Takeaway: CDNs are not optional for media hosting at scale—they transform an impossible origin bandwidth and latency problem into a manageable, cost-effective architecture by caching content at the network edge closest to users.