Content Delivery Networks
A content delivery network (CDN) distributes copies of web content to servers at the network edge, close to end users. It reduces latency, offloads origin traffic, and absorbs traffic spikes by serving cached content from geographically distributed points of presence.
itNetworking | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Content Delivery Networks
A CDN is a fleet of caches standing between your users and your server, each one holding a copy of a response so the server does not have to. Before these existed, every request crossed the network to one room where one machine answered everybody. That works until a popular page meets a distant continent, at which point the speed of light starts sending invoices.
The whole arrangement runs on five words: route, key, freshness, fill, observe. Routing picks which edge answers. The key decides which stored response counts as the one being asked for. Freshness says how long that response may be reused. Fill is what happens on a miss — the edge fetches from an upper tier or the origin. Observation is everything that tells you the other four are working.
Here is the part that surprises people: the geographically nearest edge is not necessarily the one chosen. Routing weighs network latency, reachability, and capacity, so the right answer is a suitable delivery point, not the closest dot on the map. Map distance and network distance agree about as often as maps and territory generally do.
The surprise that bites, though, is that a long TTL is a promise, and not the one you think. It permits reuse for that period; it does not guarantee any cache keeps the object for that long. Eviction can remove a perfectly fresh response to make room for something else. Fresh and stored are two different questions, and conflating them is how "but I set it to a year" ends up in an incident channel.
The cache key deserves equal suspicion. Leave out something that changes the response — a language header, say — and one stored answer serves the wrong people. Put in something unique per request, like a tracking value, and one object becomes thousands of near-identical entries while the origin does all the work anyway. The key is a correctness boundary first and an optimization second, which is a polite way of saying it is a correctness boundary.
Updates have three exits: short lifetimes and more origin traffic, a purge when content changes, or a new versioned URL whose bytes never change so it can carry a long lifetime. Broad purges are dramatic in the wrong direction — they empty caches everywhere and send a wave of misses at the origin. Purge narrowly.
And no, a CDN will not fix a slow origin, wrong headers, or an unreachable server. It distributes copies, not competence.
The Intro carries the full architecture, the Cheatsheet holds the directives and decision rules, the Practice tab turns headers into evidence, and the Quiz checks you can tell a key problem from a freshness problem — the two that look identical from a dashboard.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/rfc/rfc6707.html
Supports
- CDN terminology for origins, surrogates, user agents, delivery, distribution, control, and logging
- Dynamic content acquisition and request-routing functions
- CDN interconnection roles and metadata exchange
- RFC 6707 publication in September 2012 defining the CDNI problem statement
- https://www.rfc-editor.org/rfc/rfc9111.html
Supports
- HTTP cache operation, cache keys, freshness, age, validation, and stale responses
- Vary-based matching and risks from omitted representation selectors
- Cache-Control semantics for max-age, s-maxage, public, private, no-cache, no-store, and must-revalidate
- Age response header meaning and authenticated-response storage rules
- Conditional validation with entity tags and modification dates
- RFC 9111 publication in June 2022 replacing RFC 7234 as the HTTP caching specification
- https://www.rfc-editor.org/rfc/rfc9110.html
Supports
- HTTP conditional request semantics
- Validators, If-None-Match, If-Modified-Since, and 304 Not Modified
- Safe and unsafe request method semantics
- https://www.rfc-editor.org/rfc/rfc8246.html
Supports
- Versioned URL pattern for long freshness lifetimes
- Immutable response directive semantics and limits
- Revalidation behavior after an immutable response becomes stale
- RFC 8246 publication in September 2017
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowCloudFrontWorks.html
Supports
- DNS routing to an edge location
- Edge hit, edge miss, origin fetch, response forwarding, and cache fill
- Regional edge caches between points of presence and origins
- Invalidation across edge and regional cache layers
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-the-cache-key.html
Supports
- Cache keys as unique identifiers for stored objects
- Query strings, headers, and cookies as possible key inputs
- Minimum necessary key values and duplicate-object risk
- Distinction between representation-changing and telemetry-only request values
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cache-key-understand-cache-policy.html
Supports
- Cache policy TTL settings and interaction with origin headers
- Provider minimum TTL overriding restrictive origin directives
- Cache-key controls for headers, cookies, query strings, and compression
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html
Supports
- Separation of origin request data from cache-key data
- Forwarding telemetry without fragmenting the cache key
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cache-hit-ratio.html
Supports
- Cache hit ratio definition and origin-load relationship
- TTL, Origin Shield, query, cookie, and header effects on reuse
- Avoidance of high-cardinality request headers in cache keys
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/reports-and-monitoring.html
Supports
- Cache statistics, access logs, metrics, error monitoring, and configuration tracking
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html
Supports
- Cache hit rate, origin latency, and status-specific error-rate metrics
- https://developers.cloudflare.com/cache/concepts/cache-control/
Supports
- Provider handling of origin Cache-Control directives
- Shared-cache and browser freshness separation
- Configuration-dependent overrides and directive examples
- Integer TTL requirements and provider-specific behavior
- https://developers.cloudflare.com/cache/how-to/purge-cache/
Supports
- Purge by URL, tag, hostname, prefix, cache key, or entire cache
- Recommendation for single-file targeted purge
- https://developers.cloudflare.com/cache/how-to/tiered-cache/
Supports
- Lower-tier and upper-tier cache hierarchy
- Reduced origin connections and requests through shared upper tiers
- Regional cache topology and operational caveats
- https://developers.cloudflare.com/cache/concepts/cache-responses/
Supports
- Provider cache statuses for hits, misses, bypasses, revalidation, and asynchronous updates
- Provider Age header behavior and diagnostic interpretation
- https://www.rfc-editor.org/rfc/rfc9213.html
Supports
- Targeted cache control framework for directing cache directives at specific cache classes
- CDN-Cache-Control response header semantics and target-list precedence over Cache-Control
- Interaction between targeted freshness and end-to-end freshness including the Age header
- RFC 9213 publication in June 2022
- https://www.rfc-editor.org/rfc/rfc3040.html
Supports
- Surrogate as a gateway delegated authority to operate for an origin server
- Replication and caching taxonomy including demand-driven replication and inter-cache communication
- RFC 3040 publication in January 2001
- https://www.rfc-editor.org/rfc/rfc3568.html
Supports
- DNS-based, transport-layer, and application-layer request-routing mechanisms
- Request-routing selection criteria including proximity, surrogate load, and content availability
- Limitations of DNS-based routing such as resolver-level granularity and TTL effects
- RFC 3568 publication in July 2003
- https://www.rfc-editor.org/rfc/rfc8006.html
Supports
- CDNI metadata object model exchanged between interconnected CDNs
- Cache generic metadata including TTL and serving-stale policy for downstream CDN surrogates
- RFC 8006 publication in December 2016
- https://www.akamai.com/site/en/documents/research-papers/1997-consistent-hashing-and-random-trees.pdf
Supports
- Consistent hashing and random trees as distributed caching protocols
- Cache selection that survives server additions and removals
- Publication in May 1997 at the ACM Symposium on Theory of Computing
- https://en.wikipedia.org/wiki/Akamai_Technologies
Supports
- Akamai incorporation on August 20, 1998 out of MIT research and the MIT $50K competition
- Commercial CDN service launch in April 1999 and NASDAQ listing in October 1999
- https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js
Supports
- jsDelivr response headers including x-cache, x-served-by, Age, ETag, and Vary for a versioned asset
- Cache-Control with max-age, s-maxage, and immutable on a versioned URL
- Multi-tier cache evidence in x-served-by listing two edge caches on one response path
- https://unpkg.com/[email protected]/umd/react.production.min.js
Supports
- unpkg response headers including cf-cache-status, Age, Last-Modified, and Expires for the same versioned asset
- Cloudflare-fronted delivery of the same asset for cross-provider comparison
- https://www.fastly.com/blog/summary-of-june-8-outage
Supports
- Fastly outage description including a valid customer configuration change triggering a global disruption
- Detection and recovery timeline for a CDN control-plane failure
- https://blog.cloudflare.com/incident-report-on-memory-leak-caused-by-cloudflare-parser-bug/
Supports
- Edge response-processing bug that leaked memory into served responses
- Cached leakage in downstream caches including search engine caches and the effort to purge them
- Global kill switch as the mitigation mechanism for a fleet-wide edge feature
