CDN
A CDN (Content Delivery Network) is a geographically distributed network of servers that caches a website's static content (images, video, scripts) and delivers it to the user from the node closest to him, minimizing the distance and response time.
Contents
What is a CDN in simple words
A CDN (Content Delivery Network) is a system of servers scattered across different cities and countries. Its main task is to speed up the loading of websites and applications so that files (images, video, text) open in fractions of a second wherever the user is located.
Imagine that the main office of an online store (the main server) is located in Vladivostok. If a buyer from Moscow wants to visit the site, his computer will have to “wait” while the data travels thousands of kilometers. The site will load slowly. With a CDN, copies of your files are distributed in advance across thousands of servers around the world. When visiting the site, the user is automatically redirected to the nearest server (for example, in Moscow) and instantly receives the desired image or video.
According to analytical companies, using a CDN can speed up website loading by 2-5 times. At the same time, 53% of users leave a website if it loads longer than 3 seconds. A CDN not only improves the user experience but also positively affects SEO — search engines rank faster websites higher.
In Russia, both local CDN providers (Ngenix, Selectel, CDNvideo, EdgeTsentr) and some foreign networks that have retained physical nodes in the country operate. Read about how to choose a CDN for business in the article Infrastructure.
How a CDN works
The CDN operation process can be divided into several stages:
1. Content caching
When you connect a CDN to your website, the system creates copies of your static files (images, CSS, JavaScript, video) and saves them on all servers of the network. This happens automatically — you simply specify which files need to be cached.
2. Determining the nearest server
When a user opens your website, the CDN determines his geographic location by IP address and directs the request to the nearest server. This is called geo-routing.
3. Content delivery
If the requested file is already on the nearest server, it is instantly given to the user. If the file is not there (first request or the file has been updated), the server contacts your main server (origin), receives the file, saves it and gives it to the user.
4. Cache update
When you update files on the website, the CDN automatically updates the caches on all its servers. The update time depends on the TTL (Time To Live) settings — the lifetime of the cache.
Main advantages of a CDN
- Faster loading: Content is transferred from a server that is physically closer to the user. Pages open instantly, even if the company's main server is located on another continent.
- Protection from overloads: The CDN takes on peak loads itself, protecting the main server from failures during a sharp growth of traffic (for example, during sales or viral publications).
- Resource savings: The main server spends less computing power and bandwidth, since it distributes only dynamic data.
- Improved security: Most CDN providers provide protection from DDoS attacks and hide the real IP address of your server from attackers.
- Better SEO: Search engines (Yandex, Google) rank websites that load quickly higher, which positively affects conversion and sales.
Main types of CDN
1. Public CDNs
Available to all internet users. Examples: Cloudflare, Akamai, Amazon CloudFront, Google Cloud CDN. Suitable for websites with a global audience.
2. Private CDNs
Created specifically for one large client (for example, Netflix or Facebook). They provide maximum performance but are very expensive.
3. Local CDNs
Operate within one country or region. In Russia, these are Ngenix, Selectel, CDNvideo, EdgeTsentr. Optimal for websites with an audience inside the country.
4. Cloud CDNs
Provided as part of a cloud platform (Yandex Cloud CDN, VK Cloud CDN, AWS CloudFront). Easily integrated with other cloud services.
How to choose a CDN provider
When choosing a CDN, pay attention to the following criteria:
- Geography of nodes: The more points of presence in the regions of your audience, the faster the loading will be. For Russian websites, nodes in Moscow, Saint Petersburg, Novosibirsk and Yekaterinburg are important.
- Price: Tariffs can be fixed (for example, 600 rubles per month for 1000 GB) or pay-as-you-go (from 0.5 rubles per 1 GB of traffic).
- Security: The presence of built-in protection from DDoS attacks, support for SSL/TLS, WAF (Web Application Firewall). Read about what WAF is in the article WAF.
- Integration: Ease of connecting to your website or CMS (WordPress, 1C-Bitrix), the availability of plugins and API.
- Support: 24/7 technical support, the presence of an SLA (service level agreement).
For Russian projects, experts recommend choosing local providers — they are better connected with local communication providers and conduct document workflow in accordance with Russian legislation. Read about how to choose IT solutions for business in the article Fintech.
Frequently asked questions
What is a CDN in simple words?
A CDN is a network of servers around the world that store copies of your website (images, video, styles). When a user opens the site, files are loaded from the server closest to him, not from your main hosting. This makes the site faster, especially for users from other countries or regions. Read more about choosing IT solutions in the article Infrastructure.
How is a CDN different from hosting?
Hosting is the place where your website is stored (the main server). A CDN is an additional network of servers that speeds up the delivery of content to users. Hosting stores all files, while a CDN stores only their copies for fast distribution. They work together: hosting is like the main house, while a CDN is like warehouses in different cities with copies of goods. Read about choosing hosting in the article Low-code.
Which CDNs work in Russia?
In Russia, local providers operate: Ngenix (the largest, part of Rostelecom Data Center), Selectel, CDNvideo, EdgeTsentr, cdnnow!, as well as cloud Yandex Cloud CDN and VK Cloud CDN. Among foreign ones, Cloudflare has retained several nodes in the Russian Federation, but its use may be unstable due to restrictions. For Russian projects, it is better to choose local CDNs. Read more about choosing providers in the article Fintech.
How much does a CDN cost?
Prices depend on the volume of traffic. Some providers have fixed tariffs (for example, 600 rubles per month for 1000 GB at cdnnow!). Others offer pay-as-you-go — from 0.5 to 1.5 rubles per 1 GB of traffic. Some cloud providers (Yandex Cloud) give free limits of up to 150 GB. For small websites, CDN costs amount to 500-3000 rubles per month. Read about choosing tariffs in the article Infrastructure.
Is a CDN free?
Some CDNs have free tariffs: Cloudflare (the most popular free CDN in the world), as well as Russian services like TurboFlare. However, free tariffs usually have restrictions on traffic, speed or functionality. For serious projects with large traffic, it is better to use paid solutions. Read about choosing a CDN for business in the article Low-code.
Why do I need a CDN if my website is already fast?
Even if your website is fast in your region, it can be slow for users from other cities or countries. A CDN solves this problem by storing copies of files around the world. A CDN also protects from DDoS attacks, reduces the load on the server and improves SEO. If you have a global audience or plan to expand it, a CDN is necessary. Read about protection from DDoS in the article WAF.
How to connect a CDN to a website?
Connecting a CDN usually takes 10-15 minutes: choose a provider, register, create a CDN resource and specify the address of your main server. Then in the DNS settings of your domain, create a CNAME record pointing to the address of the CDN provider. Configure caching rules and an SSL certificate. Most CMS (WordPress, 1C-Bitrix) have plugins for automatic integration. Read more about configuration in the article Infrastructure. We also recommend reading about the concept of a Domain.
Other terms in «Infrastructure»
Was this information helpful?
Build reliable IT infrastructure
Build a modern, fault-tolerant IT infrastructure. Design, equipment supply, installation and maintenance turnkey.