CDN (Content Delivery Network)
Speed isn't just about fast servers; it's about physics. Learn how CDNs beat the speed of light by moving content closer to your users.
What you will learn
- Understand the geography of Origin vs Edge
- Compare Pull (Lazy) vs Push (Proactive) strategies
- Master cache invalidation techniques (TTL vs Purging vs Versioning)
- Leverage Edge Computing (Cloudflare Workers, Lambda@Edge)
You have a server in New York. A user visits from Tokyo. The speed of light is 300,000 km/s. Even if your server processes the request in 0 milliseconds, the Network Latency alone will be ~200ms round trip.
To the user, your site feels "laggy". You cannot beat physics. But you can cheat.
- The Origin Server: Your Factory in New York. It creates the product (the HTML/Images).
- The User: A Customer in Tokyo.
- Without CDN: Every time a customer wants a widget, you ship it from NY to Tokyo via FedEx (15 hours).
- With CDN: You rent a Warehouse in Tokyo. You ship a crate of widgets there once. When a customer orders, the local warehouse delivers it via bike messenger (15 minutes).
Key Concept: CDNs bring the content physically closer to the user.
A CDN is a network of thousands of servers scattered around the globe.
Create a free account to read the full chapter — advanced chapters, progress tracking, and quizzes are free with sign-up.