CDN: what is it and why is it needed

CDN: what is it and why is it needed

01.07.2022
Author: HostZealot Team
2 min.
1598

CDN (Content Delivery Network) is a geographically distributed network infrastructure created to optimize the delivery and distribution of data to the end user – you and me.

Despite the apparent complexity, in practice, it all works very simply. Imagine a situation: you start the computer, open the browser, then go to a site of interest. So you send a request to the web server, and after a few moments the page will be in front of you – this is the server's response. This is a standard data transfer mechanism, and if there are any problems on the server side, the site simply will not load. But the risk of failure of individual nodes always exists, and CDN technology was developed precisely to prevent such unpleasant situations.

The content delivery (and distribution) network involves the introduction of additional storage and data transfer nodes – these are auxiliary servers that cache part of the content, or even the entire site. That is, the site data is duplicated in several parts of the world – which means that your site will be accessible to visitors even if on the main server some kind of failure will occur. Requests from the visitor will be redirected to the caching server that is closest to the visitor – in addition, this allows you to reduce ping, since traffic will move along the minimum possible route.

CDN network also allows you to seriously reduce the load on the central server. And the more caching servers are connected to your website, the faster and more stable the resource will work. In a nutshell, it increases fault tolerance and security against DoS attacks.

Terminology and how CDN works

There are 6 key terms that reveal the essence of this technology:

  1. CDN is a distributed content delivery network.
  2. Origin is a central server where sources are stored, which are duplicated on caching servers.
  3. Static content is data that is stored unchanged on the server and is not automatically modified in any way.
  4. Dynamic content is data that is generated on the server when a request is received from a visitor.
  5. PoP is a point of presence or a caching server within a distributed network.
  6. Caching is the process of writing data to an intermediate buffer, from where almost instantaneous reading by the server is possible.

For clarity, you can imagine such a situation – your central server is located in Toronto, Canada, and a resident of any other city somewhere in the world – say, Kyiv, Ukraine is trying to connect to this origin to read the news and find out how their diaspora is doing there in general. The distance from Kyiv to Toronto is approximately 7551 km in a straight line. This is quite a lot, and it should be borne in mind that fiber optic cables do not run in a straight line, so the distance will be even greater. And the ping, respectively, is also huge.

In order for pages to load quickly in such scenarios, a geographically distributed network infrastructure – CDN – is needed. Thanks to the connection of several caching servers in different parts of the world, you will be able to ensure fast loading of the site for all visitors who are within an acceptable radius from the points of presence.

cdn: what is it and why is it needed

How to set up a CDN

To distribute static content to multiple PoP points, you need:

  1. To pour all the static content on a separate domain.
  2. To agree through the provider on the connection of the CDN network. Arrange for a CDN network connection through your ISP.
  3. Contact the DNS registrar to configure the CNAME record.
  4. On the main site, change the domain name for static content that needs to be broadcast via CDN.

Content management systems (CMS) have special plugins that are needed to integrate this technology. But you should understand that the points of presence cannot act as classical data stores, they only cache and transmit information from the origin.

What are the advantages of CDN?

Let's highlight the key features:

  • increases the site loading speed by optimizing the network route;
  • reduces the load on the central server node, increases the fault tolerance and stability of the site;
  • increases the geographical reach of the audience –  and significantly;
  • allows you to scale the number of PoP in order to integrate into new markets and reach a new audience;
  • simplifies the task of hosting "heavy" content, which is especially useful if resource-intensive applications or interactive media files are running on a central server;
  • promotes SEO – sites with a geographically distributed infrastructure get higher positions in search engines, they are better ranked.

In the end, this increases the reliability and stability of any resource, so with proper configuration, you can bring the uptime of the site up to 100%. This technology is ideal for online stores, as well as for various streaming services, and software distributors. The same Netflix, YouTube, and Spotify actively use CDN, since there are simply no more worthy alternatives today.

This concludes our material and thanks for your attention. If you have any questions, write to us, our specialists are always in touch.

Related Articles