What is a Content Delivery Network (CDN)?

Introduction

A Content Delivery Network (CDN), as the name implies, is a network of servers for the purpose of delivering website content. Although web servers are primarily responsible for serving a website’s content on the World Wide Web, a CDN can improve user experience by decreasing the distance between a user and the content (resulting in lower latency and improved throughput).

CDNs are now very popular and used by websites with massive traffic such as Facebook and Amazon to provide a fast experience -- no matter the user’s geographical location.

Website experience without a CDN

Before CDNs became popular, content on the World Wide Web was mostly served from the same physical web server which a website was hosted on. This server is also called the origin server, because all the content of a website originates from this server. Without a CDN, all the content of a website will be served out of the origin server regardless whether the request comes from a web browser in China, Italy or Brazil.

The website experience of different end users will be different. For example, if the origin server of a website is located in Rome, Italian web users will experience decreased latency and faster web page loading times. Users in China and Brazil will experience high latency and slower web page loading because data has to be transmitted over a much longer distance.

Experience with a CDN

What CDN helps with is by vastly improving the latency and loading times of web pages because most of a website’s content need not be served out of the origin server and can be served out of servers physically located close to the end user called edge servers.

Let’s use an analogy to illustrate why CDNs are so useful. Imagine if you order -- say -- a new phone. Rather than having a single warehouse in a country hallf-way across the world, the company selling the phone(s) will have a warehouse (ideally) in the same country.

What is a Content Delivery Network (CDN) and how does it help with security

This is roughly how CDNs work -- data is physically closer to end-users, much like a warehouse of products. This results in faster delivery times -- or in the case of CDNs, faster page load times. Unfortunately, there is a caveat: most CDNs do not have a "facility" -- or edge server -- in the same city as every user. So, users will have usually have to contend with data within a close proximity, but the general experience for users should still be improved.

Reducing bandwidth cost using a CDN

So far, the benefits of a CDN that have been discussed are from the users’ end. From the perspective of a website owner, other than providing a much better experience for the end user, a CDN also helps to reduce the overall cost of delivering content.

For very popular websites, bandwidth on the origin server is a major expense. By using a CDN, the origin server does not consume as much bandwidth because most of the content served to its end users are served using the bandwidth of the edge servers. This reduces the cost of bandwidth on the origin server, which will use a far smaller amount of bandwidth to serve content to the edge servers (usually a single time). Therefore, by using a CDN, a popular website can serve the same number of users at a lower cost.

Security improvements using a Content Delivery Network

By using a CDN, a website gains addtional security, and can also be protected from some forms of distributed denial of service (DDoS) attacks. DDoS attacks generally seek to overwhelm an origin server with a large volume of requests such that the origin server is unable to respond to all the requests and freezes, which brings the website down.

With a CDN, most of the content delivery to requests are distributed from the edge servers instead of the origin server. Therefore, it is harder for the attacker to target the origin server directly. Even if an origin server goes down due to a DDoS attack, to the end user, the website can still appear to be up and running as content is served from the edge servers' cache instead of the origin server.

Glossary

Edge Server

An Edge Server is a server used as part of a global CDN or edge network. Usually an Edge Server is just one of hundreds of servers located around the world located in a close proximity to the end user.

PoP

PoP stands Point of Presence and is usually referred to as a region where a company or service operates from.

CDN

A CDN, or "Content Delivery Network," is a network of servers (typically placed around the world) used for the purpose of delivering content (videos, photos, CSS, etc..).