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
Intro
Content Delivery Networks
A content delivery network, or CDN, delivers content through distributed infrastructure. Instead of sending every request to one origin server, a CDN routes a request to an edge location that can serve it.
The edge location may already hold a reusable response. That is a cache hit. The edge returns the response without asking the origin. If no usable response exists, a cache miss occurs. The CDN fetches from the origin or another cache layer, forwards the response, and may store it for later requests.
This design can reduce latency, network traffic, and origin load. It also creates distributed state. You must decide what can be cached, how long it stays fresh, which request details create distinct variants, and how updates replace old content.
The request path
A typical request follows this path:
- A user agent resolves the application hostname.
- Request routing selects a suitable edge location.
- The edge builds a cache key from the request.
- The edge looks for a stored response under that key.
- A hit returns from the edge.
- A miss travels toward the origin, possibly through an upper-tier cache.
- The response returns to the user and may populate caches along the path.
The selected edge is not always the geographically nearest site. A provider can consider network latency, reachability, capacity, and policy. The practical goal is a suitable delivery point, not a dot that looks closest on a map.
The origin remains the authoritative source for the content. An origin can be a web server, object store, application service, or another delivery system. The CDN sits between user agents and that origin. It does not remove the need to operate the origin correctly.
A CDN is more than a cache
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
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
- 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
- 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
- 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
