CDN — Content Delivery Networks

What, Why and How?

Anuradha Wickramarachchi
Towards Data Science

--

CDN Connectivity

What?

What is a CDN? Well is a complex network focussed on delivering content. What content? pretty much everything you load from a popular web service would deliver content through a CDN. For an example, FaceBook, NetFlix and YouTube uses content delivery networks to serve the billions of users who requests data from their servers. The main idea behind a CDN is the distribution of content in a manner that improves spacial (location based) and temporal (access time based) localities.

An example
Usually NetFlix installs redundant servers throughout the world at difference ISPs to server users. These servers are called Open Connect Appliances which keeps content locally based on access. Anything new that arrives at NetFlix core would be pushed into these so that the local users will be upto date with show catalogues.

An Open Connect Appliance

Why?

Think of the story of NetFlix or FaceBook. Huge number of users keep requesting content all around the world and obviously having a single huge server farm is not a solution due to many reasons.

  • Single Point of Failure (SPOF)
  • Network Latency
  • Cost (ISPs have to jump through many BGs — Border Gateways, that connect different ISPs. This costs!!)
  • Requires redundancy for fail safe

Furthermore, if you inspect the DOM (Document Object Model) of FaceBook, you can see the following.

Content Loaded over CDN

Images of FaceBook are usually rendered using the Akamai CDN. You can find more who uses Akamai here.

How?

CDNs are mostly distributed systems that talk to each other. As per the definition of a distributed system, the entire system appears to be one end point to anyone who reaches it.

Simplified Process

How CDN get updates

Global Redirectors

The concept of global redirectors is important to discuss on CDNs. These are the ISP level or regional level redirects made to reach the closest server which has the requested content.

Type www.google.com and you will be redirected to www.google.lk (since I’m writing from Sri Lanka). This is global redirection.

Why Open Connect Appliances

Why don’t ISPs have a single server rack to cache all the stuff, why CDNs push their own devices to ISP premises? Well if ISPs were to know what you requested they would have to open and see the content you requested over internet. Modern web enforces HTTPS, which makes this impossible. If they are to open your requests they would have to be a middle man which will again fail at browsers, because this will fail the SSL certificate validation. Therefore CDN issue their own appliance which does the task in a more secure and a reliable manner.

This may sound like an annoying task for the ISP, to have some box at their premise. Well NOT!! This is because having such device will enable them to reduce the number of request that pass ISP and reach the WWW. This is a huge cost reduction. Eventually both the CDN and ISP are happy, so are we.

Thank you for reading. Hope you learned something new. Cheers! :-)

--

--