What is a content delivery network (CDN)? And when does it really make sense?

What is a content delivery network (CDN)? And when does it really make sense?

Do you have a website, online store or blog and are getting more and more attention and website visitors from all over the world? Great, then you've already done a lot right. But what if you notice in Google Analytics that your biggest fans and visitors come from New Zealand, even though your location is in Berlin or London? This is where a CDN comes into play.

It's hard to win over customers and stand out from the competition in a sea of countless digital "trends". Of course, as a business-minded person, you know that customer loyalty is the key to success - and the key to customer loyalty is a good user experience! 

A Google study comes to the following conclusion: "[...] a one-second delay in mobile load times can impact conversion rates by up to 20%". Another Google study, in which over 900,000 mobile websites of different sizes were tested, shows an average loading time of 22 seconds on mobile devices. That's a hell of a long time to keep your users waiting.

So the first step is to optimize your website and your content. If you're not sure how to optimize your WordPress, start by taking a look at our article on the 10 most important performance optimization tools.

Your site is now optimized down to the last line of code and yet your loading times still leave something to be desired? Latency is most likely the culprit.

The "latency" metric indicates how long it takes for data to be sent from point A to point B. Let's say we send our website to a user in the same city - in this case, the latency will be quite low because the distance the data has to travel is short.

What is a content delivery network (CDN)? And when does it really make sense?

However, if we increase this distance, the time required to send this data from point A to point B becomes much longer. 

What is a content delivery network (CDN)? And when does it really make sense?

So how can we ensure that our website loads even faster for visitors? One popular method is to use a CDN - that's an acronym for "Content Delivery Network". So next, let's talk about what that means exactly and how it can help you.

What is a CDN? 

First, I would like to break down the three sections of the term "content delivery network": 

  • Content: The data that you make available to your website visitors (website, video, image, etc.)  
  • Delivery: How this data is retrieved by the user
  • Network: The places where your data is stored at any given time

Content Delivery Network is basically an umbrella term for a collection of servers at different locations, which are referred to as PoPs (Points of Presence). Typically, these are located in different countries around the globe. The locations are strategically positioned to be closer to a wider user base. In larger countries such as Russia and Brazil, there are even regional and national (R/N) CDNs due to their size.

CDN point of presence

The servers that are placed around the globe are called proxy servers or edge servers and store your data there (this can be optimized so that only the most frequently requested content is cached if your database is very large). 

What is a content delivery network (CDN)? And when does it really make sense?

When users connect to your website, they are redirected to the nearest server with the cached data. If the user requests data that is not yet stored in the cache, the proxy server requests your origin server to deliver the requested data.  

What is a content delivery network (CDN)? And when does it really make sense?

You can determine how the CDN caches your data by defining caching rules. Depending on which CDN service you use, there are various ways to implement this. 

The result is a massive advantage for the end user. Especially in terms of the speed at which content can be loaded, due to lower data latency and higher uptime. This is because the number of users connecting to a single server is now distributed regionally. 

Do I even need a content delivery network?

The main advantage of using a CDN is that you can make your data available to users faster and more reliably. But you need to consider your target audience and customer base. Let's look at two different examples: 

Example #1: Flower store

The likelihood that the flower store's customer base is largely regional is very high. And unless the store is getting a shoutout from a Kardashian, we can assume that the network traffic (the number of people viewing the website at any given time) is pretty low. Even if we include the occasional website visitor from overseas who might be planning to buy flowers while on vacation.

This type of site wouldn't see a massive improvement by using a CDN - local load times are pretty fast (unless your hosting server is on the other side of the planet). And we can probably assume that the romantic overseas vacationer is pretty tolerant of the extra few hundred milliseconds of additional load time.

Example #2: Video streaming service

On the other hand, a video streaming service: 

  • Users in several countries
  • A large user base
  • Most likely large files that are streamed
  • Tens of competing platforms, which makes the user experience even more important for customer loyalty

For this type of service, using a CDN would bring great benefits, as all of the above factors could affect the hosting server's ability to send data to the user. Here's why: 

  • Users who are further away from the host server have longer waiting times, simply because the data has to travel a greater distance. 
  • If more and more people try to access your content, this can lead to the server running out of resources (computing power) to send this data back to your users. This is also known as a "bottleneck".
  • The continuous requests from the streaming service to the server can then lead to a crash - this is known as downtime. 

So how would a CDN help your servers run better? 

Speed - How a CDN can improve loading time

Firstly, the CDN of your choice would have servers in different regions, meaning that your visitors can access the server closest to them. This would help with your loading speed. 

Depending on the configuration of your CDN, you may only want to cache the most frequently requested files. This is very useful if your website is very large, as it can reduce the costs for the data center. 

Distribution - How a CDN improves uptime

Now that you have a variety of servers around the globe, your website visitors will connect to the server closest to them. 

This means that instead of 10 million visitors in 10 countries all trying to connect to one data center, you now have 10 servers that can handle, say, one million visitors each. These servers are called edge servers (the proxy versions of your host server) and this solution is called "load balancing".

Security - How a CDN improves security

Websites (usually larger, popular websites) can fall victim to a DDOS (Distributed Denial of Service) attack. This is when your server is overloaded with network traffic that prevents other users from contacting your website.  

CDNs can help with some aspects of a DDOS attack, but they are obviously not a miracle cure:

PROS:

  • The CDN can redirect a large amount of network traffic by distributing it to different PoPs (Points of Presence). This means that the origin server is not overloaded and should not cause an outage. 

CONS: 

  • CDNs are only cached versions of your origin server. So if your origin server falls victim to a DDOS attack, you may not be able to access the data that is not yet cached in your CDN. 
  • In some sophisticated DDOS attacks, the attacker will actually use the CDN to cause the origin server to fail. This is done by causing the CDN to make multiple requests to the origin server, which then brings it to its knees.

In this case, it's good to remember that a CDN is a "content delivery network" and not a network defense.

How do I get a CDN for my website?

Ok, you're now convinced that you need a CDN. But does that mean you now have to host your data in multiple locations and pay a fortune for it? 

CDNs have been around for a long time - since the 1990s to be precise. But as with most technologies, the costs were initially quite high. Fortunately, this has now changed and the options for implementing CDNs are now affordable and no longer rocket science.

There are various providers that specialize in CDNs. They are usually integrated via name server entries (which we also recommend) or sometimes via WordPress plugins. The most popular providers include:                                                

If you want to use these solutions, you still need to make a few configurations to define the CDN's caching rules. In many cases, your host can support you with appropriate documentation and advice - or the CDN is already integrated into the hosting offer.

Conclusion

A content delivery network is a tool in the internet ecosystem that has the power to bring our content to the end user faster and more reliably. Some websites will benefit from CDNs, others will not. It's important to remember that a CDN should only be used in conjunction with good optimization and security measures to get the most out of it for your website visitors. 

Do you have any questions?

Do you use a CDN? And what are your experiences with it? Please leave a comment or contact our support team directly if you have any specific questions.

Did you like the article?

With your rating you help us to improve our content even further.

Write a comment

Your e-mail address will not be published. Required fields are marked with *