Skip to main content
Legia

IT Infrastructure & Cloud

What is a CDN?

Also called content delivery network, content distribution network.

Short definition

A CDN (content delivery network) is a network of servers spread across many locations that stores copies of website content, so visitors are served from the nearest server and pages load faster.

How it works

The website still has one main server, called the origin. A CDN places intermediary servers in many cities and countries. When a visitor opens a page, the request is routed to the nearest CDN server. If that server already holds a copy of the requested image, CSS, or page, it sends the copy directly without contacting the origin. If not, the CDN fetches it from the origin once, then stores it for the next visitors.

Benefits for the company

Pages load faster, especially for visitors far from the server's location. The load on the main server drops because most requests are served by the CDN, so a traffic spike during a campaign does not immediately slow the website down. Many CDN services also filter malicious traffic, including DDoS attacks, before it reaches the server.

What needs to be configured

Cache rules determine which content may be stored and for how long. Pages that differ for each user, such as a shopping cart or a dashboard after login, must not be cached for everyone. After the website content is updated, the cache needs to be purged so visitors do not keep seeing the old version. The main server still needs care, because a CDN only speeds things up and protects them; it does not replace an origin that is down.

Related Legia service Server Installation & Management Setup, hardening, monitoring, and migration for physical, virtual, and cloud servers.

Resources