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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticSubnetting and CIDR NotationIP Routing and ForwardingLoad Balancing and Server SelectionReverse Proxy and Caching ArchitectureContent Delivery Networks (CDNs)

Longest path: 85 steps · 354 total prerequisite topics

Prerequisites (4)

Leads To (0)

No topics depend on this one yet.