How using a CDN could speed up your site
- What is a CDN?
- How does a CDN work?
- Static and dynamic content
- What are the benefits of using a CDN?
- How to get free access to Cloudflare Enterprise
What is a CDN?
Imagine a situation: two users with the same devices and network speed try to open the same site, which is located on a server in Europe. At the same time, user #1 is located in Europe, and user #2 is in Asia. The latter’s request will take longer to process due to geographic remoteness and this, in turn, will affect the download speed.
Don’t forget, this factor is also key for ranking in Google search results, since it directly affects the bounce rate. For instance, if page loading time increases from 1 to 3 seconds, then the bounce rate increases by 32%. If it takes as long as 6 seconds then the bounce rate will go up by 106%. This problem cannot be solved only by optimizing the site and server, so using a CDN is necessary.
A CDN (Content Delivery Network) is a geographically distributed network structure, serving the purposes of optimizing the content delivery to the end user. When using a CDN, an intermediate “stage” is added to the usual user-server-user scheme of request processing.
How does a CDN work?
Let’s get back to our example with a European server and two users located in different regions. When using a CDN, the response time for a user from Asia will decrease, because the request will be processed not by the original European server, but by the closest Asian one, included in the CDN network. That is why using a CDN is vital for “heavyweights” such as online stores with a vast product catalog, photo and video hostings, streaming platforms, gaming services, social networks and sites with a large number of visitors around the world.
When using a CDN, users receive cached data from the closest CDN server (point of presence or PoP), not the original one, which may be located much further away. The cache on the CDN server is formed in this way:
- The first, most time-consuming user request is sent to the main server.
- Cache, generated according to the request, is transferred to the point of presence (CDN server, which is the closest to the user).
- Cached data is sent to users from the point of presence, in response to all subsequent requests of the exact type.
- CDN servers of the same network send requests to each other (to minimize the number of requests to the main server and shorten the download time for end users).
Accordingly, the wider the CDN network is, the more requests from a larger number of geographic regions it’s able to process. This means that the European site loading time for users from Europe and Asia will be approximately the same, if the point of presence is located in the latter region.
CDN servers are used for caching according to the specific requests, not for downloading, as file servers.
Static and dynamic content
Now after we have described the basics of a CDN network, it is worth mentioning how exactly content of different types (static and dynamic) is processed.
Static content is cached content that cannot be altered – graphics, audio and video files, JS elements, CSS, etc. It is the largest, therefore the slowest to download. Its processing directly depends on the network speed.
Dynamic content is generated at the time of receiving a server request and can be downloaded from the database, or altered by the user (favorites, history, geolocation, etc.). It is processed by hardware, using RAM.
Downloading and request processing time increase, if both dynamic and static content are loaded simultaneously within the same server. This is where a CDN also helps. Dynamic content, being much less resource-intensive, is downloaded from the main server, and static content is delivered to the end user via the CDN network, which significantly reduces the download time.
What are the benefits of using a CDN?
Let’s take a look at the example of the popular CDN provider Cloudflare:
- Improves user experience: Faster loading means a lower bounce rate from users and more time spent on the site.
- Attracts more visitors: Directly related to the previous point, since Google takes user experience into account as well as performance in its SERP rankings. The higher the position is, the more views the site is likely to receive.
- Has a positive effect on Core Web Vitals metrics: CDN usage is directly related to the Time To First Byte (TTFB) metric, which in turn affects First Input Delay (FID). We’ve already covered the role of these and other metrics in our article on the critical rendering path.
- Decreases the load on the site’s web server: Most of the responses are returned from the cache.
- Improves reliability and safety: Provides VPN, firewall, protection against DDoS attacks, bots and data leaks.
- Provides detailed statistics and reports: Info on used bandwidth, page views, deflected attacks, etc.
How to get free access to Cloudflare Enterprise
Clickio uses Cloudflare’s Enterprise level service, which provides access to Cloudflare dedicated IP ranges, providing prioritized routing and protection to ensure maximum speed and availability. It also comes with a 100% uptime guarantee, advanced protection from bots and 24×7 support.
This service is usually only available to large companies and specialist tech firms, but publishers using Clickio Prism automatically get free access to Cloudflare Enterprise via Clickio’s account.
To find out more, please contact us.