A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Content Delivery Networks (CDNs)

Graduate Depth 84 in the knowledge graph ☐ I know this ☆ Set as goal
354prerequisites beneath it
See this on the map →
DNS: Domain Name SystemHTTP: Hypertext Transfer Protocol+2 more→
cdn content-distribution edge-caching latency-reduction geographical-distribution

Core Idea

A CDN is a geographically distributed network of caches (edge servers) that store copies of popular content. CDNs intercept DNS requests and direct clients to the nearest edge server, reducing latency and bandwidth costs. Modern CDNs like Akamai, Cloudflare, and AWS CloudFront are critical infrastructure for web performance.

Explainer

You understand how DNS resolves domain names to IP addresses and how HTTP delivers web content. Now consider the performance problem: if a website's server is in Virginia and a user is in Tokyo, every HTTP request must travel across the Pacific Ocean and back — roughly 150 milliseconds of round-trip latency just from the speed of light in fiber. Multiply this by the dozens of resources a modern web page loads (HTML, CSS, JavaScript, images), and the delay becomes intolerable. A content delivery network solves this by placing copies of content on servers distributed around the world, so users fetch from a nearby server instead of the distant origin.

The mechanism relies on DNS, which you already know. When a website uses a CDN, its DNS records are configured so that lookups for the domain (say, images.example.com) are delegated to the CDN's DNS infrastructure. When a user's browser resolves images.example.com, the CDN's authoritative DNS server examines the request — noting the user's geographic location (inferred from the DNS resolver's IP address) — and returns the IP address of the nearest edge server (also called a point of presence or PoP). The browser then connects to that edge server via HTTP. If the edge server has a cached copy of the requested content, it serves it immediately — a cache hit. If not, it fetches the content from the origin server, caches it locally, and then serves it to the user. Subsequent requests from the same region are served directly from the cache.

CDN caching behavior is controlled by HTTP cache headers like Cache-Control and Expires, which the origin server sets to tell edge servers how long content remains valid. Static content (images, CSS, JavaScript files) is ideal for CDN caching because it rarely changes. Dynamic or personalized content is harder — CDNs handle this through techniques like edge computing (running application logic at the edge), cache key variations based on cookies or query parameters, and short TTLs (time-to-live) that force frequent revalidation with the origin.

Beyond reducing latency, CDNs provide several additional benefits. They absorb traffic spikes — a viral video might generate millions of requests, but most are served from edge caches rather than overwhelming the origin server. They improve reliability through redundancy — if one edge server fails, DNS can redirect to another. And they provide DDoS mitigation by distributing attack traffic across many edge locations, each absorbing a fraction of the load. Modern CDNs have evolved far beyond simple caching to become programmable edge platforms that can perform TLS termination, image optimization, A/B testing, and even run serverless functions at the edge — all before a request ever reaches the origin.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Subnetting and CIDR Notation → IP Routing and Forwarding → Load Balancing and Server Selection → Reverse Proxy and Caching Architecture → Content Delivery Networks (CDNs)

Longest path: 85 steps · 354 total prerequisite topics

Prerequisites (4)

Leads To (0)

No topics depend on this one yet.