What Is a CDN?
NicolasBrondinBernard
Content Delivery Networks Explained: A Simplified Written and Visual Guide!

Article published on 08/01/2024, last updated on 07/08/2026
The acronym CDN stands for "Content Delivery Network" and refers to a service that will allow you to respond more quickly, and more efficiently, to your users' requests on the web for anything related to static files.
A static file can be an HTML file, a CSS stylesheet, a JS script, an image, a video, etc…
You should know that a CDN is not a technology, like a web server such as Apache or Nginx might be, but rather a service offered by a company that relies on many existing technologies.
And so, not all CDN services are equal and don't always offer the same features… But we're going to focus on the possibilities offered by the majority of existing services, and their overall functioning.
How it works
A little analogy
To understand the value of a CDN, we're going to use the analogy of a fictional fast food chain, which we'll call SuperBurger, which is a huge success in the United States, and which is arriving in France, with its first restaurant, in Paris.
As you've probably guessed, this restaurant is your web server, and the burgers it prepares are the pages and static resources of your website.
The fact that there is only one restaurant in all of France, and that it's so popular, creates two problems:
- People living in Marseille, so hooked, drive 8 hours, just for a burger
- The restaurant is packed, you might wait up to 4 hours, have no place to sit and sometimes even leave with nothing, due to ingredient shortages in the kitchens
And this has consequences:
- People are frustrated, and don't try the experience again
- Some are too hungry, so they go to the competitor
- Etc…
We could increase the size of the restaurant and the number of employees, but that wouldn't change anything for the people coming from all over France who take hours to arrive (and imagine if you don't have a direct highway)!
The best solution is to open franchises: The same restaurant, copy-pasted, but spread across all cities in France, whose offerings, recipes, and ingredients are dictated by the original restaurant.
As a result, everyone has a restaurant 15 minutes from their home, there's no waiting line, and everyone is happy (except the competition).

How it actually works
What I just described to you is exactly the main way a CDN works.
When you configure a content delivery network, you're going to give it a source of truth, most of the time, the URL of the web server where your static files are stored.
In return, you'll receive a root URL that you can use, as soon as you need to create a link to a static file
And as soon as a user requests access to a particular file, here's what will happen:
- the CDN will check the visitor's location
- it will check if the file in question is present on the copy of your site that is geographically closest to the visitor (called the cache)
- If the file is present, and recent enough, it will be sent to the user
- If the file is absent, then the CDN will download the file from the source of truth (your web server), it will copy this file onto its own cache servers, all around the world, then it will send the file back to the visitor
In short, the very first visitor to request the file in question will have a slightly longer wait time, but this will be offset by all the following users who request the same file!

The advantages of a CDN
As I said in the introduction, not all CDNs are equal, the more locations they have spread around the world, the shorter the latency time for each request.
To give two examples, CloudFlare is present in 193 locations, spread across more than 90 countries, and Cloudfront has 90 points of presence in 47 countries.
To sum up, a CDN is an aggregation of several services:
- Many file servers
- A cache system
- A load balancer
- SSL certificate management
- And there's often a network security layer, for example to prevent DDOS attacks
Concretely, for your web server, this means fewer requests, less load, less latency and more availability for users.
A French CDN
We've already mentioned the two biggest existing CDNs, Cloudflare and Cloudfront, but if you want to try a French alternative, OVH offers a CDN service with 140 locations!
Link: https://www.ovhcloud.com/fr/web-hosting/options/cdn/
Complete courses, exercises and certificates to really learn programming!
4.8 average rating
No comments yet