What Is a CDN?

Chances are you interact with CDNs (content delivery networks) on a daily basis, but what exactly is a CDN and how does it work? Our expert explains.

Written by Katlyn Gallo
Published on Sep. 27, 2023
Illustration of how a CDN works — a map of the glob with illustrations of servers placed in strategic locations. Hands are gesturing to different points.
Image: Shutterstock / Built In
Brand Studio Logo

A CDN (content delivery network) is a method of improving web content delivery speeds by caching content on geographically distributed servers. 

Caching is a functionality of the technologies we use every day that store data so it can be referenced for future requests and served quickly. Caches exist in your computer, browser, search history and more. They’re what make it convenient for you to find files you recently worked on, pull up a website you recently visited or quickly find contact information for someone you spoke with the other day.

Similarly, using caching for content distribution, as a CDN does, lessens the load on a web server (or servers) hosting a site while allowing for fast and reliable content transfers to end users. 

How Does a Content Delivery Network Work?

A CDN works by storing cached versions of content, including webpages, stylesheets, files, images, videos and more. These caches exist on geographically distributed servers, also called points of presence (PoPs). When users visit webpages using a CDN, their device can load the content from a cache server that’s geographically close to the end user instead of communicating with a web server that may be on the other side of the world.

 

More From This ExpertWhat Is LDAP?

 

What Does a CDN Do?

CDNs Improve Performance, Reliability and Availability 

When we consider the performance, reliability and availability improvements CDNs bring, we can compare it to the wholesale industry. Imagine you’ve found a product you love, but can only purchase it when you visit a wholesaler, like BJ’s or Costco. The nearest BJ’s or Costco is an hour drive from you, so you don’t purchase the product as often as you’d like because it’s an inconvenience to you to have to drive so far. 

Similarly, if a user in Frankfurt, Germany, visits a website hosted on a web server in California, the page will take some time to load and functionality within the page might be slow as well. 

Now imagine your local supermarket that’s just five minutes down the road starts stocking that product you love. You no longer have to drive so far to purchase it, so you buy it each time you’re at the store without any inconvenience to you. This change has created a distribution point for the product closer to you, in turn, improving reliability and availability because you no longer have to make a long drive for the product. 

We can compare this to a cache server that brings web content closer to a user, thereby making it easier for their device to load the webpage and its subpages.

 

CDNs Reduce Costs

In addition to performance and reliability, CDNs reduce overhead costs incurred by the website owner due to the decreased direct visits to and from the web server. Rather than a website needing to repeatedly deliver its content to each unique request, it delivers content to the CDN, which caches it on its distributed group of servers. This method reduces the amount of web traffic hitting the web server, therefore reducing server and bandwidth costs to the website owner.

 

CDNs Improve Security and Cyber Resilience

Finally, CDNs improve the security and cyber resilience of websites because they are generally better equipped to handle the large amount of traffic we typically see during a DDoS attack, a common cyberattack that targets websites. Without a CDN, a website can risk becoming overloaded with malicious network traffic meant to crash the server and render it unavailable, which impacts the website’s overall resiliency. 

Because CDNs are so widely used today, information security has become a critical and core competency of CDN providers like Cloudflare, Google Cloud, Amazon and Akamai. Not only can these providers thwart DDoS and other common web application attacks, they can also block traffic sourcing from known spam IPs, web scrapers and other types of bot activity. 

Related Reading From the Tech DictionaryWhat Is Latency?

 

How to Use a CDN

Although most internet users may not realize it, we use CDNs any time we do almost anything online. While those who work in the technology industry are likely aware of this, the average user has no idea a CDN is responsible for the quick and reliable experience of visiting web pages, viewing images and videos, or downloading files.

From a technical perspective, those who manage web servers and the sites hosted on their servers must interact with the CDN provider they’ve chosen (Cloudflare, Google Cloud, Amazon and others). While the process of configuring a CDN for your website can vary, these are the most common configuration components.

 

DNS Record

A DNS record redirects users to the CDN URL when they navigate to your website. For example, if I added a CDN to a website, mydomain.com, we’d need to create a DNS record to redirect traffic destined for mydomain.comto mycdn.mydomain.com.

 

Cloud CDN

A Cloud CDN caches the content on your website. This can be a self-hosted CDN, which is sometimes an option depending on the platform on which you’re hosting your website, or a provider-hosted one, which is more common in an enterprise setting.

 

Load Balancer

A load balancer manages incoming traffic to your website and, therefore, the CDN. Load balancers are crucial to ensure internet traffic is balanced across the CDN cache servers, so one or two servers aren’t overloaded.

Once these configurations are in place, all that remains is to review documentation for your website to ensure the correct configurations are in place to properly cache content and then upload content to the CDN. In most cases, uploading content manually isn’t required because the CDN will pull the required content as users access your website. Some CDNs, however, allow you to push specific content if desired. 

What Is a CDN? How Does It Work? | Video: ByteByteGo

 

Examples of CDNs

While it can be difficult to find specific examples of CDNs, there are many instances in which  we interact with images or files on a website that are actually delivered to us by a CDN. 

Try doing a Google search for the word “image” on URLs containing “cloudfront.net” (Amazon’s CDN URL). We can see there are plenty of image files cached on Amazon CloudFront.

a Google search engine results page
Image: Katlyn Gallo
a Google search engine results page
Image: Katlyn Gallo

By navigating to one of the links in the second search result, we can see, by way of the full URL, that Amazon CloudFront has a PDF document cached on its CDN and the file seems to be one of many contained in a Documents folder.

a screenshot of a URL toolbar
Image: Katlyn Gallo

Another example is one I uncovered while loading a policy document from my employer’s internal website. Upon clicking the link to open the policy from the webpage, I was redirected to cdn-us1.staffbase.com. This tells me the document was delivered to my computer by way of a CDN server in Staffbase’s U.S. region. 

Although CDNs can be difficult to spot, the next time you view or download a file, pay close attention to the URL to which you’re redirected. You might just see an Amazon, Cloudflare, Google or other CDN provider domain.

Explore Job Matches.