How the Cloud and CDN Architecture Works for Netflix

ResellerClub
5 min readJul 23, 2020

--

In early 2016, Netflix completed its migration to AWS (Amazon Web Services). The company that you and I know for streaming movies and shows on our devices is actually a poster child for AWS. What this migration essentially meant was that instead of storing everything on private servers, Netflix moved its data to the cloud.

This move, though it took some time to complete, became an indicator that the future was cloud storage and computing.

Netflix, apart from this, did something else that caught the attention of the tech community. They decided to implement a CDN (Content Delivery Network) on a massive scale. In this article, we look at these two moves and its implications in detail.

Netflix’s decision to migrate to the cloud can actually be traced back to one very important incident in 2008. Netflix was a simple DVD rental business back then. One data center — amongst many it had inhouse — shut down. As a result, DVD shipments, across the company, stopped entirely for three days.

This was the time that Netflix, as we know it today, was also taking roots. The company was growing at a high rate and would need huge amounts of storage. There was no way that they could expand storage at such speeds.

This is when Netflix chose to embrace the cloud. Once they decided to move to the cloud, scalability was no longer a problem. Today, the architecture is simplified to a large extent, thanks to microservers.

The Netflix infrastructure, in essence, is broken into multiple microservers — servers with relatively lower capacity that usually take care of one single task. In Netflix’s case, each microserver manages one aspect of the service.

This way, everything happens independently and there’s pretty much no reliance on other aspects. Isolation and independence of services, within an established architecture, was a groundbreaking idea.

The advantages of moving to the cloud are apparent today. Scalability obviously is one of the biggest advantages. The speed at which Netflix releases new content, interfaces, interactions, features is almost unparalleled. And all of this happens at the same time across the globe.

For example, one fine day, Netflix was made available to 130 additional countries simultaneously — in one go. Netflix was able to do this only and only because they had cloud infrastructure. Basically, they asked AWS for more resources and AWS provided it. There’s no better example of scalability than this.

Then there’s pricing. Because of the way that the cloud works, you only pay for what you use. This allows Netflix to experiment a lot. For example, the recommendations that you see on your Netflix feed require lots of computation power.

Thanks to the cloud, Netflix — while retaining its old recommendation algorithms — can try out a new one across the globe for a while. If it works, it works. Or else, they pull it back. They pay only for the extra power that they use.

Netflix isn’t just a poster child for AWS today. It’s a company that’s shown the world how much things can improve with the help of the cloud. The same rules of scalability, price, and flexibility apply to small businesses as well.

Netflix garners a lot of attention because it’s a big company. Small businesses, by shifting to the cloud, have a lot to gain as well. If businesses have good web hosting and adopt proven and effective digital practices, the sky’s the limit.

Back to Netflix, though, and their adoption and implementation of CDN. A CDN or Content Delivery System basically refers to servers that are geographically distributed but work together to provide fast delivery.

So, things like HTML pages, images, videos, javascript files, and stylesheets can be quickly transferred. This results in faster loading times. CDNs are becoming more and more popular today. Amazon, Facebook — they all use it.

Even though other companies use it, it’s Netflix that benefits the most from using a CDN. A CDN, in essence, caches content at the edge of the network which greatly improves the speed of a website.

So, how exactly does a CDN work?

A CDN, at its heart, is a network of multiple servers across the globe, all connected together. The idea is to bring the servers physically close to the viewer. When these servers cache content, it reduces the hosting bandwidth, which in turn helps in preventing interruptions and increases speed. This feature of CDN primarily and significantly benefits the web hosting industry. Business websites can avail the benefits of reduced page load times with CDN as well as Cloud Web Hosting to deliver content faster and cut down the server load.

One other advantage that a CDN offers is content availability and redundancy. So, if Netflix were to use an origin server, a problem at the server would affect everyone worldwide. Because Netflix uses a CDN, it can handle hardware failure much more effectively.

Netflix, back in the day, outsourced this job. But as traffic and volume grew exponentially, third-party providers just couldn’t keep up. So, Netflix designed its own CDN called OpenConnect.

Basically, it installs its CDN appliances in data centers of local ISPs. This pretty much isolates Netflix from everything else on the internet. Netflix has algorithms that calculate popularity locally. So, with this information and their storage technique, they distribute content intelligently.

This way, offload efficiency is maximized and upstream demand is reduced. All this jargon basically means that we get to see videos with not a lot of buffer time. And this is very important to Netflix.

Netflix knows very well that if a video takes five more seconds than usual, and this happens a few too many times, they will lose subscribers. With the help of an intelligent CDN, when we hit the play button, the video can be fetched from multiple locations.

As mentioned earlier, it isn’t just about the speed. An ISP in Brazil, not too long ago, burned down their entire stack of Netflix appliances. Want to know how this affected users in Brazil?

In no way whatsoever.

The devices had multiple servers where the exact same data was stored. So, instead of this data center, they looked elsewhere and found it. There wasn’t even a drop in one frame. That’s how secure CDN is.

Now, mind you, CDN isn’t a web host. Proper web hosting is still required. It’s just a very efficient caching server which improves performance significantly. This combination of cloud and CDN has benefited Netflix greatly.

Over the years, Netflix has developed a number of tools for the AWS platform. They have made these tools open source as well because they know it’s better that way. They can still use their code while they get the benefit of the intelligence of the coding community.

Netflix, to you and me, might be a video delivery service. But, one of the reasons that it became so popular in the tech world was because it developed and implemented a solid architecture for data hosting, management, and delivery.

A lot of pure “tech” companies could learn a thing or two about architecture from Netflix, really.

--

--