CDN Explained

CDN Explained

What is Content Delivery Network (CDN)

Content Delivery Networks (CDN) are linked servers strategically placed around the world. They help websites serve static content faster to any location. Aside from performance improvements, CDNs also help improve website reliability and security.

Why Use a CDN

Websites are collections of multiple types of data that work together to form a whole. For example, a website can have HTML files, images, and contain raw information in a database. All of this sits on a web hosting server.

When a visitor types in the address of a website, the browser sends a request to the server. The web server then delivers the content requested. One problem with this lies in the distance between the visitor and the web server.

The further the distance, the longer data will take to travel. If visitors are on the other end of the world, they may feel that the performance of the website is poor – even if that’s not necessarily true.

Although site owners can try to choose server locations closer to their target audience, this can be tricky at best. To overcome this issue CDNs come into play.

How CDNs Work

To address the distance between websites and visitors, CDNs keep a cached copy of the static elements on your site at multiple locations. When a request is made to your site, the CDN serves that data from the closest location first. 

Meanwhile, your site has just bought a little more time to deliver the remaining information requested. While the primary purpose of this is to improve the speed of delivery to various locations, CDNs come with other benefits as well.

Advantages of Using a CDN

Reduced Latency

As mentioned, one of the primary reasons for using a CDN is to help improve website performance, in particular, the web page loading speed. This is done by caching static content at strategic locations around the world.

Increased Security

Since they act as a front line for your site loading, CDNs also act as the first line of defence. In fact, CDNs have been known to offer multiple security benefits. These range from the prevention of Distributed Denial of Service (DDoS) attacks to bot management and control.

Lower Server Loads

Storing and delivering cached static elements of your website means these won’t have to be delivered from your web hosting. That’s not just a reduction in process, but potentially significant savings in bandwidth as well.

Extra Features

Not all web hosts offer you the best of everything. For example, some may not support HTTP/2 which can be helpful in increasing website performance. Using a CDN means you might be able to inherit some of these features from it instead.

Data & Analytics

If all information to and from your site is flowing through a CDN, it can collect massive amounts of data. For those who don’t want to look towards another party to provide analytics information, you can get it from your CDN provider.

Types of CDN Available

There are two main types of CDN currently available in the market – push and pull. When you ‘push’ a server, that means you are actually pushing static content onto the CDN. For instance, if I were to upload an image it would be pushed on to the CDN. The CDN would then take that image and cache it out across its network. 

A ‘pull’ server differs slightly in comparison with a ‘push’ server. In a ‘pull’ server, someone has to request the link for what you are looking for. For example, when someone requests an image from your site, the CDN looks at your server and pulls that image out, downloads it and then distributes the image.

Other Useful CDN Terminology

  • Node – Each CDN server is called a node. Data is typically served out of the node closest to where a request has been made.
  • Load Balancing – Distributing data delivery in an efficient manner to ‘balance’ the use of resources on a server or network. This helps to avoid congestion and slow down performance.
  • DDoS – A form of cyberattack designed to overwhelm a web service (e.g. website, web application) with an overload of data. When the service can no longer cope, it crashes and becomes unavailable.
  • Origin – This is what CDNs refer to as the server from which it pulls content. For example, if your website is using a CDN, that would be the ‘origin’ your CDN refers to.
  • Time to live (TTL) – Since all assets on CDN servers are caches, a period needs to be set for that data to expire. Then, a new request will be made from the CDN to the origins for fresh data. This is known as TTL.

Conclusion: The Benefits Outweigh Cost

Performance and security are two key watchwords for all website owners. In addition to that, CDNs are relatively cost-effective. Cloudflare for example, offers a free solution. CDNs also mainly charge by bandwidth, so you only pay following the traffic volume you get.

There really aren’t many reasons not to use a CDN, and as I’ve outlined above, the benefits far outweigh the potential cost.

author avatar

Author Profile

Timothy Shim is a writer, editor, and tech geek. Starting his career in the field of Information Technology, he rapidly found his way into print and has since worked with International, regional and domestic media titles including ComputerWorld, PC.com, Business Today, and The Asian Banker. His expertise lies in the field of technology from both consumer as well as enterprise points of view.