Content delivery network (CDN)

In today’s networks, high availability, speed and performance are the key elements needed to consider. Especially with the over growing size of the Internet, better network resources become more and more demanded. In this article, I will talk about CDN, one of the most important aspect of the Internet. Imagine you work for a big company that consists of multiple websites that are scattered all over the world. You would probably think that installing a couple of web servers and adding a high bandwidth would solve your problems, but the things are a little more complicated. Let’s say your company has its main office in New York and this is the location where the websites are hosted. What would happen if a user from Australia would request something from your website? Since the Internet is so large you would probably think that the user’s computer would send an HTTP request to the web-servers directly and the servers would reply with the desired resource. How long do you think it would take for the server to receive that request and send the answer back? Imagine how many routers would the packets have to travel through, how many processing resources, encapsulation/decapsulation, routing and path selection mechanisms would it take to reach their destination (check out my networking articles if you don’t know what are these elements). This is just for an HTTP request. Imagine you need to download a large file containing your favorite game client, watch a movie online or browse for a resource that would require high bandwidth. Well, without CDN networks these things would not be possible, at least for remote locations or for large resources. A CDN or Content delivery network is a collection of servers interconnected, that are distributed around the world. I think you’ve heard a lot about the term “Cloud” but never understood the main principles behind it. Websites with high traffic require high availability and speed to serve all requests. Here is where CDN networks play their role. You’ve probably heard about Microsoft’s Azure, Rackspace, Amazon’s or Google’s clouds. A company that would want to create its own CDN network would have to install and configure multiple servers in datacenters all around the globe. The company would also have to lease ISP lines to have full interconnectivity between its servers. The servers would normally run the same applications that are replicated between them. When a new version or a new resource is added to a web application, this is automatically copied/updated to all servers inside the CDN (that run that particular website).
Large enterprises like Amazon build their own clouds to serve and lease their servers to smaller companies. In our days, a company that would require a high availability and speed website would lease storage space and server resources from a Cloud provider. When a user would try to access the website, the CDN would find out which server or resource is as close as possible to the user. Now let’s say that a user is requesting a file from a website. The user is located in China and the website is functioning inside a CDN that has servers in Japan, France and Argentina. The user will receive his desired resource from Japan since it’s the closest location from the user. These are the main principles behind CDNs functionality. Now imagine a second user is requesting the same thing from the website. How much bandwidth would it be wasted to fetch that resource again. CDNs use cache methods in which resources that were requested previously by a user, are stored locally so that when a new request with the same resource is demanded, the CDN would simply sent it directly to the user’s computer.
I don’t know the exact protocols or methods used inside CDNs because I’ve never worked for a company that owned one. At my workplace, we have a couple of production servers that host our high traffic websites. When developers add a new resource to a certain website, that resource is replicated from our servers to the  CDN. When users request something from our websites, they never reach out to our servers, the CDN’s servers would process their requests. This adds a certain amount of security since our core servers are not advertised outside.
I would really like to learn more about the protocols used inside CDNs so if you have anything to add or to share with us, please leave a comment, post a question. I think this is an interesting topic especially for those that work in the IT department. I hope you’ve made a general idea of CDNs, enjoy your day and stay tuned for more articles to come.


2 thoughts on “Content delivery network (CDN)

  1. I think your post gets the point across, Dan.

    Just a couple of things I wanted to add… like you said, most major companies, especially large web enterprises like google, facebook, amazon etc.. have their own CDNs, but there are also a variety of 3rd party CDNs created to serve other enterprises that don't have their own CDNs. Some examples include Akamai, CDNetworks (I am an employee here), China Cache etc..

    Companies that want to improve web performance can simply subscribe to the services from CDN solution providers and deploy their site and/or application on their networks. Some are truly global and some or not. There is no one CDN that is right for all websites.. the reach, performance and cost varies between each CDN. The best advice here is to request a performance test and compare the results.

    As for specific protocols (assuming you mean directing traffic), it can be specified by the site owners. A simple rule is assigned to the network to direct traffic however the site owner desires. However, if the specified server for any reason fails or shuts down, the request will be re-directed to the next closest server. In the event of heavy traffic, the network is also intelligent enough to offload some of the traffic to another nearby server.

    Hope I was able to provide some clarification.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s