The speed of a website plays a central role in the impact it generates. When the site is too slow to load, not only can its ranking be affected in the results pages – the “SERPs” – of search engines, but it also suffers from high bounce rates. Result: the handicaps it accumulates weigh on traffic and conversion rates, and ultimately on revenue generation …

The loading time is therefore a point on which it is advisable not to compromise. While it is essential from this point of view to optimize the site itself, in particular by reducing its code, minimizing the weight of the pages or even limiting the number of HTTP requests necessary to display each of the pages, rapid distribution of its content anywhere in the world is only possible today with the support of a CDN.

Trainer training

And if the interest of such a solution is obvious for SEO and for the international user experience, its advantages do not stop there: a CDN also optimizes service continuity, reinforces security and reduces bandwidth consumption.

CDNs: definition

A CDN (for “Content Delivery Network”) is an infrastructure of networked servers strategically located around the world and used to shorten the physical distance between the place of origin of the content and the ” the place where the site visitor is, so as to minimize the time between sending the request made by the Internet user and the complete loading of the page on his terminal.

All other things being equal, given that the shorter this distance, and the faster the loading is due to lower latency, the CDN advantageously replaces the original server by making sure to distribute the content from that of its servers that are located closest to the Internet user.

The number of servers in the network as well as their location vary depending on the CDN provider.

How a CDN works

Latency and distance

When an Internet user visits a site hosted in England from the United States, the site loading time is longer for him than when a French Internet user accesses it. This is simply because the latency increases with the distance. During their journey, both the request sent by the Internet user and the response to this request pass through a series of routers, which are more numerous than the distance is important and which add latency at each step.

Working principle

To reduce this latency and ensure fast page loading, the CDN stores and keeps cached a version of their static content (HTML code, images, CSS and JavaScript files) on mirror servers distributed over its various “points of presence”. (PoP) across the world.

When a request for content is sent by an Internet user, the CDN begins by determining the server best able to respond to it, namely the one that will ensure the fastest processing of the request given the location of the Internet user. and also taking into account the load already weighing on the resources and the quality of the connection. The CDN routing mechanism redirects the request to the selected server, which then responds by displaying the cached copy of the page requested.

“Pull” and “push” mode

In most cases, CDNs offer two operating modes for the distribution of static page files on their mirror servers: “pull” and “push”.

  • In “pull” mode, the first time it has to display a page, the CDN automatically fetch the required content from the origin server and serves it to the visitor. At the same time, it caches this version of the page on these mirror servers and keeps it until the expiration of the configured lifetime of the content, the TTL for “Time to live”. On subsequent occasions, the mirror server best placed to process the request takes care of serving the content to ensure a fast loading of the page on the user’s terminal.

In this scenario, the CDN takes care of everything and there is no need to “push” updates to it. When the TTL expires, the CDN automatically retrieves the latest version of the content from the hosting server and streams it to its mirror servers. On the other hand, in “pull” mode, the loading will be accelerated only on the second call of the page and can then be slowed down during updates of the cached version due to requests on the origin server. In addition, this mode is likely to generate “redundant” traffic insofar as the defined TTL can cause the CDN to request the origin server when the content has not actually changed. This mode is generally recommended for frequently updated, small to medium sized resources.

  • In “push” mode, there is no automatic extraction, it is the site which must push the content on the CDN by storing it in a given location. After the files are pushed, the mirror servers synchronize with this location. The content in this scenario is more quickly available for viewing by the best-placed mirror server upon the first request of the page, and thereafter when a new version is pushed. This mode has the advantage of limiting traffic, since there are no automatic updating requests here, as in “pull” mode. On the other hand, the site must take care of pushing the modifications so that they are taken into account, and this mode is most often reserved for large files that are seldom modified.

By setting pull zones and push zones, you can control how the site is cached on mirror servers. The two modes can coexist, and nothing prevents, for example, from defining a “pull” zone for HTML, CSS and JavaScript files, and a “push” zone for heavier files, such as archives, images, video files and audio, etc.

Why use a CDN

Such caching of the content of a site on a CDN architecture has many advantages. If its primary interest is to boost the loading times wherever the Internet user is, thus benefiting the user experience and the referencing of the site everywhere in the world, it also has the advantage of optimizing the continuity of service of the Internet. site, strengthen its security, and reduce the bandwidth consumed.

SEO

The speed of loading sites is a relevance criterion officially taken into account by Google for ranking in its search results since 2010 on desktop and since 2018 on mobile. Even if the true weight of this criterion in the calculations of the search engine’s algorithm raises questions and is announced as low by the California firm, the fact is that if the engine can offer comparable web pages that are faster to load, this is what this criterion will lead him to do.

On the other hand, because of the constraints imposed by the “crawling budget”, the maximum time that Googlebots dedicate upstream to site exploration is limited. In the case of a slow-to-load site, there is a risk that the robot will not have time to crawl everything and that the new content will not be fully indexed.

The use of a CDN, which ensures a fast loading of web pages everywhere in the world, is therefore essential in order not to penalize the referencing of its site.

User experience

Numerous studies show that around 40% of Internet users abandon a website that takes more than 3 seconds to load. The same goes for searches for products or information on the site: if the results do not appear quickly enough, the visitor usually does not wait and goes his way. And it’s also generally accepted that almost 80% of users who have had a bad performance experience on a site then permanently avoid it and never set foot again.

CDNs are therefore also essential to guarantee an optimal performance experience, minimize bounce rates and optimize conversion rates.

Continuity of service

On the other hand, when traffic loads reach millions of requests per second, even the most powerful hosting servers are put to the test. Without a CDN, all that traffic has to be absorbed into the hosting infrastructure, with the risk of a failure occurring, ending the user experience and potentially leading to a loss of business for the business. With their distributed architecture of large-scale servers, high-performance CDNs are able to absorb tens of terabytes of traffic and are able to ensure continuity of service on the largest user bases.

security

Distributed Denial of Service (DDoS) attacks continue to increase at a tremendous rate. According to the latest figures from Nexusguard, while they had already grown by 278% in the first quarter of 2020 compared to the same period of 2019, their number soared by 57O% in the second quarter year-on-year.

The purpose of DDoS attacks is to exhaust the targeted server and congest its bandwidth in order to make it unavailable by sending it massive amounts of simultaneous external requests.

With its multiple servers, the CDN acts as a bulwark against this type of attack for the website. The distribution of the load of the requests on its distributed architecture minimizes the effects of the attack on the site, which then remains available to its visitors.

Most CDNs also include ad hoc security features that monitor and filter requests made to their servers. These services analyze web traffic for suspicious patterns, and block traffic from malicious attacks. And they also generally make sure to encrypt the traffic between the CDN and the Internet user, and between the CDN and the origin server.

Bandwidth consumption

By caching the static content of websites on their servers and taking over the processing of Internet users’ requests, CDNs significantly lighten the load on the origin server.

As the hosting server no longer has to transfer this static data, which represents the bulk of a website’s content, it saves bandwidth and avoids overconsumption, which translates into cost savings.

There are many CDN offers available in the market, some of which are free and some are paid. Performance (the “query speed”), network availability (the “RUM uptime”), geographic coverage, number of servers, functionalities and of course cost, there are many characteristics to compare to make the right choice according to your needs and of its budget. Finally, note that some CMS include CDN hosting in their offer.