Automatically get a free SSL certificate with our Let's Encrypt integration.

What Is a CDN?

What Is a CDN

Technology is constantly changing and evolving which means it is important to have a fast-loading website for your visitors. Websites have to deliver more data and content than ever before. And that is where a Content Delivery Network (CDN) comes into play.

A study done by the University of Nebraska found that the tolerable waiting time for information is approximately only 2 seconds!

However, you may be asking yourself “what is a CDN?”. In short, a CDN is a group of servers strategically placed across the globe with the purpose of delivering static content to users much faster. It is becoming an increasingly popular method of content delivery and according to BuiltWith, 48.3% of the top 10k websites are using a content delivery network.

This complete guide should help you better understand what exactly a CDN is, how they work, and why it may be beneficial to start using one.

CDN Architecture

At a high level, CDN architecture is made up of two key components: PoPs (Points of Presence) and edge servers. These terms are commonly used to educate users about a CDN provider's global reach and caching server quality. Beyond these components are configurations in place to properly route traffic, mitigate DDoS attacks, and more.

PoP

Points of Presence

A PoP, also known as a point of presence, refers to the geographical location where a group of CDN servers are located. These are typically spread across the globe to cover a large distance. You can see a CDN's full list of PoPs usually by going to their network page.

Edge Server

Edge Servers

The servers located at each PoP are called “edge servers.” Edge servers are actually simple proxy caches, which work in a similar way to the cache in your web browser. They don’t generate the content for the website. Instead, they keep a copy of the content in a cache.

The dispersion of PoPs will vary from CDN to CDN. Certain providers prefer to cover more ground with small-capacity servers, while other CDNs aim to maintain fewer, high-capacity PoPs. One important aspect to take into consideration when analyzing a CDN's architecture is to find out where their PoPs are located. Depending upon where a particular website's visitors are coming from, this could be a deciding factor.

How Does a CDN Work?

As mentioned, a CDN is a large network made up of various servers located in multiple geographic regions. The PoPs are placed close to populated areas, in countries all over the world. For large countries, there may be many different PoPs.

The idea is to direct the user to the closest point of presence. When a user requests content from a site that uses a CDN, the request is routed to the closest PoP, where a web server sends the requested data. There are several different ways that a request can be routed to a specific PoP, one of which is IP Anycast.

Without a CDN

The image below shows how information travels to the origin server without a CDN. No matter where a user is based geographically, information must be requested from the origin server which can be a great distance away from the user.

Without a CDN

With a CDN

When using a CDN, edge servers distribute static website data to visitors that are close to their geographic region. The connection is fast because it’s between Internet nodes that are close together. This means fewer hops and a faster flow of data.

With a CDN

Origin servers are able to deliver all the content available on a CDN. Its job is to serve as the “single source of truth” in the CDN. In other words, it contains the most up-to-date version of the file that the CDN knows about. Since all cached content has a limited lifetimespan (as web content can change over time) the CDN's edge servers must make a request to the origin server if it doesn’t have the most recently updated content.

Commons Reasons for a Slow Loading Website

It’s important to provide a fast web browsing experience to site visitors. A slow loading website can hurt a company's conversation rates, bounce rates, online reputation, and more. Even if users don’t leave a site upon the first interaction, they are less likely to engage with the site again if the user experience is poor.

Slow Loading

There are many reasons why a website might be slow as outlined in the neighbouring list.

While all of these are important and do need to be fixed, implementing a Content Delivery Network can be a great cost effective and easy way to instantly speed up your website. You can have it up and running in minutes.

  1. Large images that aren’t compressed
  2. Inefficient CSS delivery
  3. Render-blocking JavaScript
  4. Lots of video or image files
  5. A slow web host – TTFB
  6. Not caching properly
  7. Resources aren’t minified
  8. Excessive use of plugins

What Type of Content Is Stored on a CDN?

There is sometimes a misconception about what can actually be stored on a CDN. It isn’t just images and scripts. If you are working with a WordPress website, anything in your “wp-content” and “wp-includes” folder can be pulled across and hosted on a CDN. The same is true for most content management systems. CDN’s also can deliver HD video, 4K content, as well as a multitude of other files.

Here is an example of just some of the file types that can be hosted on a CDN:

  • Images: PNG, JPG, SVG, GIF, TIF
  • Stylesheets: CSS
  • Javascript: JS
  • Video and Audio: FLV (Flash), HLS, MP4 (HTML5 videos), MOV (QuickTime), WMV (Windows Media), MP3 and WAV
  • Web Fonts: EOT, TTF, OTF, CFF, AFM, LWFN, FFIL, FON, PFM, PFB, WOFF, SVG, STD, PRO, XSF, and more…
  • Other File Formats: HTML, JSON, PDF, DOC, PPT, XLS, EPUB, ODT, ODP, ODS, TXT, RTF, ZIP

Why Do You Need a Content Delivery Network?

It doesn’t matter whether you run a small blog or a large enterprise website; there are many advantages that everyone can benefit from using a CDN. Check out the list below outlining some of the most important benefits of using a content delivery network.

Performance

Performance

Performance is by far one of the most important benefits from implementing a CDN. Content is cached around the world. The shorter distances to users will not only reduce latency but also minimize packet loss.

Upon performing various tests in many geographical locations, we've seen a CDN reduce website latency on average by 73% compared to websites running without a CDN

Scalability

Scalability is another huge benefit as offloading traffic to a CDN will make it easier to manage traffic spikes and scale up or down within a short amount of time. This will result in less load on your server and help minimize any downtime.

Since a typical website is comprised of approximately 80% static content, a significant portion of your assets will be delivered in a faster, more efficient manner from the CDN.

Scalability
Security

Security

A content delivery network can provide additional security. Since a majority of your traffic is no longer being served from your origin server, but rather from the edge servers (CDN Provider), this allows them to mitigate DDoS attacks for you. CDN’s also allow you to implement SSL certs, just like you would with your web host, ensuring encryption between both the edge server and your origin server.

SEO Improvement

When it comes to Search Engine Optimization, page speed is a very important factor in relation to page rankings. Most search engines consider the page loading time in their algorithm.

Site speed also plays a big part when it comes to Google actually crawling your pages. By optimizing your website to load faster, it will increase the frequency in which Google crawls your pages, in turn allowing your content to be more widely available and indexed faster.

SEO
Reliability

Reliability

With a CDN requests to your website are always routed to the nearest available location. If one server is not available, requests are automatically sent to the next available server. This creates automatic redundancy helping to ensure that your website always remains online and available for your visitors.

Lower Costs

A content delivery network requires less self-managed infrastructure and makes it easier to reduce costs. If you are paying your web host based on bandwidth a CDN can dramatically reduce this because assets are served from cache on the edge servers as opposed to directly from your web host (origin server).

You can even take this one step further by enabling Origin Shield.

Cost
Conversion Rate

A Fast Website Increases your Conversion Rate

Did you know that a slow website actually hurts your conversion rate? According to Kissmetrics, 1 second delay in page response can result in a 7% reduction in conversions.

If you were able to increase your website by 2 seconds by using a content delivery network, that means an approximate increase of 14% in conversions!

People Are Less Likely to Abandon a Fast Website (Bounce Rate)

There are many factors that contribute to a website’s bounce rate such as navigation, appearance, and usability. A very important factor and one that is easy to fix is the load time of the website. According to Web Performance Today, 57% of online consumers will abandon a website that takes more than 3 seconds to load.

If your website is taking longer than 3 seconds to load it could be dramatically affecting your sales!

Bounce Rate

Content Delivery Network Primary Features

Each CDN provider offers a different set of features and options. A particular feature that is available from one CDN provider may not be available from another. However, A few important core features that you want to look for in a CDN provider include the following.

Pull Zone

A Pull Zone automatically fetches (pulls) the requested content from your origin server and caches the assets on the CDN's edge servers. In most cases, a Pull Zone is the preferred option for any content management system (CMS) such as WordPress or Typo3. If you are curious, 79% of KeyCDN customers are using pull zones.

Push Zone

A Push Zone requires that you upload your content to a CDN storage cloud which is then distributed to the edge servers. Most providers support FTP as well as rsync over SSH to upload your data. Push Zones are mainly used for distributing files larger than 10MB or for files that rarely change (such as documents, videos, etc).

HTTP/2

HTTP/2 is a new network protocol with the aim to make the web faster. HTTP/2 is a feature that can extremely reduce page loading time. The 3 main benefits are:

  1. Allows client and server to compress request and response headers, which reduces bandwidth usage when the similar headers (e.g. X-Cache) are sent over and over again for multiple requests.
  2. Allows multiple requests over a single connection and therefore saving on round trips between client and server. Further, preventing low-priority assets from delaying higher-priority requests.
  3. Enables the server to proactively push assets to the client that it knows the client will require (e.g. CSS and images) without waiting for the client to request them.

Let’s Encrypt Integration

This feature is currently unique to KeyCDN. This means no more buying an SSL certificate if you want to use a custom zonealias.

For companies with Let’s Encrypt integration, this makes the deployment for the end user much easier. There is no more generating a CSR, saving your private key, uploading your certificate and all the back and forth emails. For most deployments, it will now be a simple one-click process.

Secure Token

Secure Token allows you to generate secured links with an expiration time. Once a token has expired, it is not possible anymore to access the content.

Hotlink Protection

Hotlink protection refers to restricting HTTP referrers in order to prevent others from embedding your assets on other websites. Hotlink protection will save you bandwidth by prohibiting other sites from displaying your images.

Origin Shield

Origin shield is basically an extra caching layer which reduces the load on your origin and accelerates the distribution of your content from the origin server to your edge servers. Origin Shield is a great feature to reduce the traffic on your origin server to an absolute minimum and protect your infrastructure from abuse or traffic spikes.

Gzip Compression

Gzip compresses your web pages and stylesheets (text, html, js, css or xml files) before sending them over to your browser. This allows for a much faster load time as the files are significantly reduced in size. Make sure your CDN provider supports Gzip compression.

Custom CNAME Support

By default when you setup a zone with a CDN provider your assets will point to their default Zone URL such as lorem-1.kxcdn.com. Setting up a custom CNAME allows you to point your assets to a subdomain on your own domain such as cdn.yourwebsite.com. This can be beneficial for branding as well as for SEO purposes when it comes to indexing your images.

CDN Integrations

CDNs are now easier than ever to integrate within your workflow, CMS, frameworks, etc. There are multiple integration guides available to make the process as streamlined and straightforward as possible.

KeyCDN offers over 20 CMS integrations to get you up and running fast! Check out the list of popular integration guides below or see the full list to quickly and simply supercharge your CMS or framework. Some content management systems even have multiple integration possibilities.

Framework Integrations

Avoid slow load times and supercharge your content.