Web Development

CDN

A Content Delivery Network (CDN) is a geographically distributed network of servers that caches static website content close to end users to reduce latency and speed up page loading.

also called: content delivery network

// definition

A Content Delivery Network (CDN) is a system of interconnected servers located across multiple geographic regions. When a user requests assets from a website, such as images, stylesheets, or JavaScript files, the request is automatically routed to the nearest server point of presence. This server delivers a cached copy of the file rather than fetching it directly from the primary web server, known as the origin server.

By decentralizing data distribution, a content delivery network significantly reduces physical distance and network hops, which minimizes latency. Modern delivery networks also offer security capabilities, including distributed denial of service protection and automated secure sockets layer termination, alongside dynamic content optimization and traffic balancing across available infrastructure.

// why it matters

Implementing a Content Delivery Network (CDN) directly improves website performance, user engagement, and conversion rates by decreasing page load times. Slow websites lead to higher bounce rates and lost revenue, especially for global audiences located far from the origin server. Furthermore, a content delivery network shields origin infrastructure from sudden traffic spikes and malicious cyberattacks, ensuring continuous uptime during high-demand events. By offloading bandwidth consumption from central servers, businesses also lower operational hosting costs while improving overall service availability.

// example

An online retailer based in Germany hosts its primary website infrastructure on a central server in Frankfurt. When a customer in Japan visits the online store, a local Content Delivery Network (CDN) edge server in Tokyo delivers product images and static media files. Because the data travels a much shorter distance, the web pages load almost instantly for the Japanese shopper, while reducing compute load on the central server in Frankfurt.

Questions and Answers

What is the difference between an origin server and a CDN edge server?
An origin server holds the original, definitive version of a website source code and database. A Content Delivery Network (CDN) edge server is a strategically located secondary server that stores temporary cached copies of static files. Edge servers deliver these cached files to nearby users to reduce physical data transmission distances and protect the origin server from overload.
Does a CDN cache dynamic content?
While a Content Delivery Network (CDN) primarily caches static files like images, scripts, and stylesheets, modern networks can also optimize dynamic content. They accomplish this by keeping open network connections, using advanced routing algorithms, and running specialized code directly at the network edge to assemble personalized content closer to the end user.
How does a CDN improve website security?
A Content Delivery Network (CDN) acts as a protective shield between internet traffic and the origin server. It mitigates Distributed Denial of Service (DDoS) attacks by absorbing high traffic volumes across its global network. Additionally, modern delivery networks manage security certificates and block malicious requests using web application firewalls before threats reach central infrastructure.