CDN stands for Content Delivery Network, a network of distributed servers designed to deliver web content—such as pages, images, scripts, and videos—to users efficiently. Instead of routing every request directly to the origin server, a CDN serves cached copies from nodes located closer to or better connected with the user. The primary goals are to reduce latency, decrease load on the origin server, and ensure more consistent delivery. The term refers to an architectural category rather than a specific vendor, and does not guarantee that a website will be fast or always available.
When a browser requests content, the request is directed through the CDN network. If a valid cached copy exists and policies allow it, the node delivers it without contacting the origin. If the cache is missing, expired, or the content isn't cacheable, the CDN retrieves the data from the origin server and may store it according to its policy. The behavior depends on HTTP headers, provider settings, and content type. Public images are often good candidates for caching, while user-specific areas typically require stricter rules.
Performance and Availability
Reducing the distance data travels can lower response times, especially for frequently requested static content. A distributed network can also absorb traffic spikes, reduce redundant transfers to the origin, and maintain availability of certain resources during high load on the main server. Some providers offer additional features such as intelligent routing, compression, DDoS protection, and application firewalls. These are not inherent to all CDNs and do not replace a reliable origin infrastructure. If the origin is offline, cached content can only serve previously stored data; dynamic or personalized pages may fail to function.
A CDN often operates as a reverse proxy between the visitor and the website. As a result, traffic passes through the provider’s network, and the visible IP address may be that of the CDN node rather than the origin server. Applications must rely only on forwarded headers from trusted proxies to correctly log client IPs. Misconfiguration can lead to incorrect IP logging, acceptance of falsified data, or compromise of logs and security controls. TLS, certificates, and redirect rules must also align consistently between browser, CDN, and origin.
Cache and Invalidation
Caching improves efficiency but may serve outdated content if TTL or cache keys are misconfigured. The TTL defines how long a response can be reused, but cache invalidation does not correct database or page errors. Rules must differentiate between static assets, public pages, sessions, and personalized content. If the cache ignores cookies or parameters that alter responses, data from different users may become mixed. Conversely, if too little is cached, the origin server continues to handle most traffic. Changes should be tested on representative pages and authenticated users where supported.
Selecting a CDN requires evaluating geographic coverage, IPv4/IPv6 support, traffic costs, support availability, logging, privacy, uptime, failover procedures, and vendor lock-in risks. Also consider how negative caching, certificates, protections, and DNS changes are handled. To assess performance, compare response times and cache hit percentages across multiple networks while ensuring content and functionality remain intact. A single quick test does not confirm overall improvement. In summary, a CDN brings content delivery closer to users, enhancing efficiency and resilience—but requires careful setup and validation.
← Full glossary