Content Delivery Networks
How the web delivers static assets globally at the speed of light.
What it is
A Content Delivery Network (CDN) is a geographically distributed group of servers optimized to deliver static content quickly to users.
**Origin Server**: The primary server where the definitive versions of your website's files live.
**Edge Locations (PoPs)**: The distributed network of proxy servers located in data centers around the world. These servers sit at the 'edge' of the network, physically closer to end-users, and cache copies of the origin server's files.
Why it matters
Physical distance equals time. Without a CDN, a user in Tokyo requesting a site hosted on an Origin Server in New York suffers high latency.
For frontend developers, a CDN is critical because it drastically reduces the Time to First Byte (TTFB) and accelerates asset delivery. Faster delivery translates to better Core Web Vitals and a seamless user experience.
How it works
When a user requests a website's asset, DNS routing seamlessly directs the request to the nearest optimal CDN node (PoP).
**Cache Hit**: If the nearest PoP has a fresh copy of the asset, it serves it immediately to the user.
**Cache Miss**: If the PoP does not have the asset, it routes the request to the Origin Server, retrieves the asset, delivers it to the user, and saves (caches) a copy locally for future requests from that region.
Try it
Toggle the CDN on and off to see how latency changes across the globe.
Global Network
Toggle the CDN to distribute nodes globally.
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
Remember this
- CDNs reduce latency by bringing content physically closer to the user.
- A 'cache miss' requires a round-trip to the Origin Server.
- Always use file hashing to avoid cache invalidation headaches.
Done with this concept?
Mark it complete to track your progress. No login needed.