Nodea — logo

CDN (Content Delivery Network)

A CDN (Content Delivery Network) is a network of servers distributed across many geographic locations that stores cached copies of a website's content and delivers it from the node — called a point of presence (PoP) — closest to each visitor. Physics is the reason it works: a request answered from a data centre 50 km away completes far faster than one that must cross an ocean to the origin server and back.

How a CDN works

A site joins a CDN by pointing its DNS at the provider, after which visitor traffic lands on the nearest edge node first. The node checks its cache: on a hit, the response goes out immediately; on a miss, the node fetches the asset from the origin, stores it according to the origin's Cache-Control headers, and serves it. Static assets — images, CSS, JavaScript, fonts, video segments — cache best, but modern CDNs also cache full HTML pages, terminate TLS at the edge, and run serverless functions there (edge computing).

The measurable effects are lower TTFB, a faster LCP, reduced bandwidth and CPU load on the origin, and far better behaviour under load. Because traffic is spread across hundreds of PoPs, a CDN also absorbs volumetric DDoS attacks by design, and most providers bundle a web application firewall, bot filtering and automatic TLS certificates.

Practical use cases

CDNs are standard equipment for e-commerce stores with international customers, media-heavy sites, software update distribution, video streaming and API acceleration. They are equally valuable as insurance: a marketing campaign, a viral post or a press mention can multiply traffic tenfold in minutes, and an edge cache keeps the origin — whether shared hosting or a VPS — from collapsing under it. Well-known providers include Cloudflare, Akamai, Fastly, Amazon CloudFront and bunny.net, several of which offer free tiers adequate for small sites.

The main caveat is cache invalidation: after deployments, stale copies must be purged or busted with fingerprinted filenames, or visitors may see outdated content for hours.

Powiązane pojęcia

Najczęstsze pytania

Does a CDN replace web hosting?

No. A CDN sits in front of your hosting and caches copies of its content; the origin server still runs the application, database and any logic that cannot be cached. Some platforms blur the line by executing code at the edge, but a conventional website always needs an origin.