What exactly is a content delivery network? And is it even needed if your website performance is already good? Let’s look at the benefits of using a CDN, which include faster loading speeds, enhanced security and more.
For a long time now, we’ve been told that website loading speeds matter a ton to our users (and to our search performance). Google even has a tool called PageSpeed Insights that tells you how fast your pages load on mobile and desktop, as well as what the breakdown is from first contentful paint to cumulative layout shift .
You know what this tool doesn’t do? Show us how loading speeds differ based on where visitors are located.
The Pingdom Website Speed Test does though.
In this tool, you not only enter your URL, but the location you want to test it from. This will give you a more realistic idea of what it’s like for visitors on the other side of the globe to open up your webpage.
To see why this matters, keep reading. We’re going to dig into what a CDN is, how it works, and why websites with a global reach need one.
Think of the internet like a food delivery service. You’ve got this incredibly tasty menu of food just waiting to be picked up and delivered to customers in their homes.
The problem is, when someone goes to place an order, they see that it’s going to take an hour and a half for the food to reach them. Some of that is because of how far away you are. Some of it is because traffic is just really bad this time of day. Regardless, they don’t want to wait that long.
While we don’t have a way to miraculously shorten the physical driving distance from a restaurant, we do have a way to do it with our websites.
A content delivery network or content distribution network (CDN) is a system of interconnected servers. They contain cached content and assets from websites, like images, HTML pages and JavaScript files.
We use CDNs to shorten the distance between websites and visitors, and vice versa. Because of how much traffic there is online day and night, things can get congested (just like a physical highway). It only gets more complicated when someone tries to access your website from the polar opposite end of the planet.
A CDN takes the content from your home server (via your web hosting company), copies or caches it and places it at data centers at various spots around the globe.
So, if your website is hosted in San Francisco and someone from Rome tries to visit it, they don’t have to wait for the San Francisco server to deliver the assets to their browser. Instead, the CDN steps in and sends the cached assets from its server in Amsterdam to the Italian user.
CDN servers and data centers do not host websites. What they do is cache website content. They cache it from the origin server.
The origin server is where the actual content lives with your web hosting provider. Whenever you make changes to the content, those changes are saved to the origin server.
The CDN does not contain this original content. Instead, it caches and stores copies of it on edge servers. These “points of presence” (PoP) are located around the globe.
The edge server content gets updated when the cached content has expired or is out of date.
So long as your content doesn’t get refreshed frequently, this process can be quite beneficial. Instead of your visitor from Rome waiting 5 seconds for your homepage to load from the San Francisco origin server, they only have to wait 1.5 seconds for the cached version from Amsterdam.
Although web hosting and CDN both use servers, they’re completely separate systems. And only web hosting is a necessity when you have a website.
Your web hosting company provides you with the home base for your website. Without it, you can’t go online. Unfortunately, the amount of servers available to host your website from are usually quite limited.
I’ll show you an example.
GreenGeeks is a hosting company with four server locations in:
The distribution of the servers is OK. There’s one in the United States, one in Canada, one in Europe and another between Asia and Australia. There are huge swaths of this planet that aren’t covered by these data centers. This means that some unlucky visitors will have to wait longer than those that live close to whichever home server the website owner uses.
Unlike web hosting, a CDN is optional. However, here’s what happens when you add a CDN to your web hosting service. This is the data center map from CloudFlare with pins for each of GreenGeeks’ servers laid on top of it:
Each of the blue pins represents a CDN data center. You can see how comprehensive the coverage is. Areas that would’ve been left out in the cold with just web hosting (like Africa, Australia, Central America and South America) have data centers close by.
There are numerous reasons why people add CDNs to their websites:
CDN edge servers drastically close the physical distance between your origin server and wherever your visitors are located. With less space to travel, there’s less traffic to contend with as well.
It’s not just the distance that improves loading speeds. It’s load balancing, too. A CDN can redirect requests as needed to help prevent one server from getting overloaded during a burst of traffic.
Latency is just one aspect of the total loading time of a page. It refers to the time it takes for a visitor’s browser to start processing the website request.
So, it’s that waiting period between entering a link in your browser or clicking on one, and when something appears and starts working on your screen. Latency usually only lasts a millisecond or two, but sometimes it can be much longer. And it can leave visitors wondering how long it’s going to take and if the website will even load.
A CDN can greatly shorten this latency period.
As we’ll see in the next section, enterprise businesses benefit the most from using a CDN. And this is a good thing as bandwidth requirements and fluctuations for websites that size can be super costly.
When a CDN is put in place, it takes over a lot of the work that would otherwise happen on the web hosting level. Essentially, by caching your content and serving it on edge servers, you no longer have to incur exorbitant hosting costs to handle all your data transfer (bandwidth) needs.
When you sign up for hosting (if it’s not built into your content management system, that is), your agreement includes an uptime guarantee. It’s almost always 99% or higher. This means the company guarantees that your website will be online more than 99% of the time. If not, you’ll be compensated for excessive downtime.
While this probably doesn’t happen often, it might if your web hosting solution has limited server coverage and an unreliable system for staying online all the time.
With a CDN, the amount of data centers where your website (or, at least, copies of it) live will exponentially increase. It would be incredibly difficult to take your website offline with that kind of network behind you. What’s more, thanks to load balancing, even if one server is overloaded or goes down, your website can always be served from one of dozens or even hundreds more.
While the content on your site won’t change from visitor to visitor, the experience they have when trying to technically access it can.
As we’ve already discussed, the physical distance between your visitors and your home base can cause serious delays in latency and total loading times. But CDNs even the playing field, allowing most visitors to technically experience your website just as locals do.
There are loads of things you can do to secure your site at the website and web hosting level. More security can never hurt though.
By adding a CDN, you’ll have extra layers of security to help fend off attacks. For instance, many CDNs help filter malicious traffic, better keeping it from reaching the origin server or your site. They may also offer additional security tools like SSL, WAF and DDoS protection.
One of the reasons why we care so much about loading speeds is because Google tells us so. While loading speeds may not be the end-all, be-all factor when it comes to how well your pages rank, they do have an impact on the user experience which guides Google’s decisions when it comes to ranking.
So, if you can speed things up, reduce downtime and create a consistent user experience for most of your visitors, it can certainly work in your favor.
Now that we know what a CDN is for and why people use it, let’s talk about who should actually use one. After all, a CDN is another solution you’re going to have to manage and pay for. If it’s not needed, then there’s no reason to invest in it (at this time, anyway).
So, should you get one? Here’s who benefits the most and least from a CDN:
Big benefits from CDN | Less likely to benefit from CDN |
---|---|
Websites with lots of static content | Websites with lots of dynamic content |
Major ecommerce websites | Small ecommerce websites |
Large global brands and businesses | Local brands and businesses |
Customers located near PoP centers | Customers not located near PoP centers (e.g., Russia, Greenland, northern Canada) |
SaaS companies | Smaller service providers and businesses |
Real-time streaming providers | Websites with externally hosted content (e.g., podcasters, YouTubers, etc.) |
Popular media websites | New or local media companies |
Popular blogs with massive reach | New or smaller blogs |
Websites that experience numerous traffic surges throughout the year | Websites where traffic remains low or relatively steady |
There are a number of factors to consider before ruling out if a CDN is for you.
For instance, let’s say your website has a lot of dynamic content. However, it’s a popular media site that publishes content every day for a global audience. The popularity of the site and its global reach make it a necessity to have a CDN, even if it has to work harder than it would storing and delivering cached static assets.
While Google might tell you what your “typical” page speed is, that doesn’t address the actual disparities in loading time when your site is accessed by visitors on the other side of the planet.
In other words, if your PageSpeed Insights score is in a good range, don’t rest on your laurels. Because while your website may load relatively fast for visitors nearby, it could be a totally different story for visitors thousands of miles away.
Just as you pay attention to responsiveness and accessibility to enable visitors to have a consistent experience with your site, you also need to look at how page speeds may be impacted by distance. And if your site has lots of traffic around the world (or it’s getting there), investing in a CDN might be just what you need.
A former project manager and web design agency manager, Suzanne Scacca now writes about the changing landscape of design, development and software.