• Vipul Maheshwari

How Netflix works?

Netflix seems so simple isn't it, Press play and magically your favorite show appears well howdy howdy it's not that easy. When we heard the name of Netflix we probably think of it as an ocean of vast amounts of a media library having endless movies or shows, From opening a new Netflix account to watching an episode of Suits, a lot is going on. But wait before getting to know how Netflix works let's declutter some facts about Netflix.

Not recently till the previous decade, Netflix actually rent DVDs to the viewers as the generalized concept, and just when you thought it's a joke,

FYI there are still some Netflix users probably in the number of millions who still pay this streaming giant for renting the DVDs. Yeah, I know there are still some OLD SCHOOL fellas.

Netflix accounts for 23 % of all the traffic generated on the internet, whoosh... that's a lot of traffic.

Watching so much high-definition video content over the internet requires a considerable amount of infrastructure and setup, probably this is the main hindrance to the company at the initial time of 2007 when the streaming services are provided to the broadband users only. But the introduction of high-speed internet changed the whole entertainment industry profoundly and today the Netflix consumes a total of 15% of total internet bandwidth.

Netflix users spend around 1 billion hours per week on its streaming content which when divided into 149 million users gives a rationalized figure of 6.78 hours per week per individual. That's approximately 1 hour of daily streaming each day. So How exactly Netflix manages to remain at this peak position in the entertainment market even with the presence of so many other OTT (Over-the-top service) platforms, let's find out.


Netflix Technological Workflow

Netflix works on the Microservice architecture. To understand it better let's think of an orchestra where every other musician is playing his individual instrument to make a whole piece of a symphony, just in the same way every service you can think of on Netflix whether it's for creating a new account or to pay for the subscription, every individual service on the Netflix is running on its own without interfering with the other one. BUT IF THEY ALL ARE RUNNING ON THEIR OWN THEN HOW ALL ARE THEY COORDINATING?

Netflix Microservice Architecture
Netflix's Microservice architecture explained

Let's take the same example of the orchestra. As Orchestra is not steered or guided without the presence of the conductor and in the same way the services on Netflix can not coordinate with each other without API ( Application programming interface), to understand it better just think of APIs as some tightly-controlled set of rules that both services can handle on both sides or if I say on the technical terms it's a type of pathway which is used by the services to talk to one another. Or to get the real sense of what APIs are on a general note, just think of some two deserted locations and there is a bridge or a road which is connecting those locations, now replace those locations as some kind of services and those bridges or roads as APIs, to get more info about the APIs you can probably google it, but you know just in case if you are more curious otherwise let's continue further.

Orchestra Working
Replica of Netflix's Microservice architecture as an Orchestra workflow

A crucial part of the Netflix platform is undoubtedly its vast amount of media library, if you calculate the number of hours to watch everything on Netflix as of now it will skyrocket to 34,739 hours (including credits because we want to get the FULL experience, JOKING ). And just in case if you want to know how many days get make of it, I have got you covered, it's 1447 days which is nearly equal to 4 years. But how the hell Netflix have this number of Hard drives to store this much amount of media content, Well you may call those hard drives as embedded servers.

According to data, Netflix uses a combination of hard drives crammed together in a systematic server. They use 36 drives that can hold about 100 TB of data. These servers are capable of storing and streaming between 10,000 and 20,000 movies and series simultaneously. Netflix has about a thousand of these spread across the globe. Each one collects content to then be transmitted to various devices. But Netflix does not maintain its own server because they once realized in the past that carrying out the servers running durably requires a breakneck amount of money, and in last who doesn't want to save a bit.

So They made a righteous decision back then in 2008 and move all of their stuff to the cloud — i.e. run everything on the servers of someone else who dealt with maintaining the hardware while Netflix engineers can make a lot of changes and wrote hundreds of programs and deployed it on the servers rapidly to make the changes on the platform if any. You might not guess this one, They choose none other than Amazon Web Services AWS. It took more than eight years for Netflix to complete the process of moving from their own data centers to AWS. During that period Netflix grew its number of streaming customers eightfold.


WAIT, Amazon!! The Boys who also happen to run the Prime thing??

Well, When you see the Statistics of the AWS (Amazon WEB Services ) they have earned a lot by maintaining the cloud portfolio of Netflix and that number is in millions and in turn Netflix saved a hefty amount of money by doing the same, So that's a win-win situation for both.

Today the AWS proudly touts Netflix as its top customer, and Netflix can rapidly improve their services and yet keep it stable because of AWS. Even if Netflix is one of the sheer competitors of amazon prime video.

Amazon Web Servers
Amazon's Web Servers . (Image is taken from the Internet)

The real effort

Any video platform is of no use if there is nothing to watch. Well, it turns out that Netflix's most important job is to carry out permission for embarking the broadcast rights from the show or movie production companies to deliver their media on the platform.

Netflix works on thousands of devices, and each of them plays a different format of video and sound files. Rich peeps got some big LCD T.V., poor peeps got Keypad Nokia phones, it doesn't matter, I think you must get my point till now. OK, so this is what we call Responsive design in technical terms, Every other set of AWS servers take the original media file, and then they convert it into hundreds of files, where each of them is meant to play the entire show or film on a particular type of device with particular screen size or video quality. One file will work exclusively on the iPad, one on a full HD Android phone, one on a Sony TV that can play 4K video with Dolby sound, one on a Windows computer, and this go on. Even more of these files can be made with varying video qualities so that they are easier to load on even with a poor network connection. This is a process known as Transcoding. A special piece of code is also added to these files to lock them with what is called Digital rights management or DRM — a technological measure that prevents piracy of films.

So next time when you open your Netflix app or website, remember it fetches that particular file for that show which is meant to play on your particular device, with a particular video quality section which is based on how fast is your internet connection is. , And boom, you get that episode of suits where Harvey specter tells Louis litt about Our planet which is a documentary on NETFLIX about Climate Change, watch it A.S.A.P. SAVE CLIMATE SAVE HUMANITY.


But Wait!! My Internet connection is too slow for binging Stranger Things

The entire playout of entertainment platforms most profoundly the OTT platforms to be precise, comes down to a very basic question. What if my Internet connection is too poor to handle the video quality, apart from Netflix let's understand what exactly happens when you search for anything on the internet, so when you search for anything on the internet it boils down to a request which is sent to your internet service provider which is, in short, is called ISP.

The ISP forwards that request to the registered servers which handles that requested search result and in turn, the servers provide a response that is relayed back to your device, and then it forms the result you searched for. For Netflix and other top-tier platforms, where millions of hours of video content are relayed across the internet between their servers and all the users, a much larger network of servers is needed to maintain performance. They do this by building something we called a Content Delivery Network (CDN).

Oops , My internet is not working. (Google source)

CDN As a can of Pepsi :)

Let's think of a Pepsi can ..........REALLY !??!?! . TRUST ME I AM GOOD IN THIS. When you buy a Pepsi can anywhere on this planet you get exactly the same taste irrespective of whether you are in London or in Mumbai. Now think of the formula which is used to make that Pepsi can, I mean the Pepsi cans are manufactured in the production units in a Coca-cola factory and then they are distributed to the grocery stores, Now if you are not Forrest Gump you would simply walk to your nearest grocery store and buy that Pepsi can rather than from that production unit. PS: You can't think of the Pepsi formula because it's a secret which is renowned as Coca-Cola's secret formula and it is famously locked inside a vault in the company's museum in Atlanta.

Pepsi Distribution
Getting the Pepsi can from a nearby store is easy for most people.

Now hold your Pepsi can and think of it like any of your Netflix's favorite show or movie, factory or manufacture unit as the main AWS Server and your grocery store as a CDN Server. Well, you may buy that Pepsi can from the factory too but just in case if you are living on a small island somewhere isolated, probably it is easier, convenient, and less time-consuming to buy it from the nearest grocery store.

So, What CDNs basically do is, they take the original websites and their media content with considering all the copyrights and copy it across hundreds of servers spread all over the world. So when say, you login from Budapest, instead of connecting to the main Netflix server in the United States it will load a ditto copy of it from a CDN server that is the closest to Budapest. This greatly reduces the Latency — the time taken between a request and a response, and everything loads really fast. CDNs are the reason why websites with a huge number of users like Google, Facebook, or YouTube manage to load really fast irrespective of where you are or what the Internet speed is like.

Working of Amazon web servers , Netflix's CDN
AWS server makes exact copies of all media content on CDNs boxes.

Netflix earlier used a variety of different CDN networks which are operated by giants such as Akamai, Level 3, and Limelight Networks to deliver their content. But a growing user base means they must deliver more content at more locations while lowering costs — and this led them to build their own CDN, called Open Connect.

CDN servers are like hard drives that store a copy of the content present inside the main server.

So at any time when you click the play button on Netflix for a specific show or a movie, it will lead to locating the 10 closest Open Connect boxes that have the exact show loaded on them. Your Netflix app/site will then try to detect which one of them is the closest or works fastest on your internet connection, and then load video from there. This is why videos start blurry but then suddenly sharpen up — that is Netflix switching servers till it connects to the one that will give you the highest quality of the video.

Netflix's CDN Box
Netflix’s Open Connect boxes supplied to internet providers. (NDTV)

How Netflix recommendation works ?!

Images are one of the first things we see when we open our Netflix wall, more specifically they are called Thumbnails in technical terms, well you might be surprised to learn that the image tile or recommendation of movies or shows shown on your Netflix wall is selected specifically for you. Strange isn't it !!

Netflix's Thumbnails
Different thumbnails for two different Netflix users for the same show.

To understand this recommendation system more clearly, better let's take the example of one of the great shows Stranger Things, Some people see the image of the whole Stranger Things crew on their image tile, some see an image of eleven only or there may be someone who might not even see the Stranger Things on their wall. But as a user what is the benefit of showing different image tiles to every other specific individual.

Netflix says that if they don’t capture a user’s attention within 90 seconds, he or she will likely lose interest and move onto another activity. Having such a short time to capture interest, images becomes the most efficient and compelling way to make users discover the perfect title as quickly as possible. But How does Netflix come up with such precise genres for its 100 million-plus subscriber base? The simple one-word answer will be a Machine learning algorithm

Ok. Now the most important part is arriving, hold your seat gentleman. I will try to make you understand what a Machine learning algorithm really is. First let's understand what is an algorithm is, for the sake of a simple definition I would say an algorithm is the series of instructions that make the computer to understand and perform specific tasks in a more systematic manner, and when those algorithms are advance written to make the computers understand the specific patterns and make the decision on its own without explicitly interfering of the Humans beings that are called Machine learning.

If some of you are scratching your mind and trying to understand what types of patterns I am talking about, well every second you spend on Netflix from searching the specific show to watching an episode of F.R.I.E.N.D.S its a type of pattern, and those patterns are seen by those algorithms in the form of data which in return help the algorithms to predict better about your personalized experience. If you get this then congratulations you have just understood the two main pillars of today's technological advancement and if not, then don't worry I have a solution for you.

Netflix Thumbnails , Stranger Things
Different thumbnails for the same show to attract different types of users.

To understand it in a better and in a simpler version, let's think of a pet dog of yours whose name is Noddy. Noddy is newly born and you are responsible to make him learn about the various things for the material world, You start with the basics and you teach him how to understand the basic signs or how to listen to your voice or how to properly behave in front of your relatives and all the other basic stuff which will help him to learn some more intermediate things. So as time flows Noddy starts to know lots of things about your behavioral pattern, your sleep schedule, and your daily routine.

Dog , Human , Bone
Bone game interaction between you and Noddy.

Ok, now just think of Noddy as any computer service you like for example Netflix itself and your teachings as your interacting pattern I mean the type of shows or media content you consume on the service. So if you are glorified with the Romantic shows Netflix will remember it as one of your interacting pattern and by collecting more and more such type of patterns in the form of data, it will try to make the best guess of the movie or show you like for your better-personalized experience, as when you spend more time with your dog it will understand you better, in the exact similar way the more time you spend with the Netflix its Machine learning algorithm will collect more and more data and that's how its recommendation system will become more solid and better on making the better guess and recommendation.

Machine learning algorithm , Stranger things
Pattern interaction between you and your service, Netflix in this case.

As per se, More than 80 percent of the TV shows and movies people watch on Netflix are discovered through the platform’s recommendation system. That means when you think you are choosing what to watch on Netflix you are basically choosing from several decisions made by an algorithm.

Netflix's Machine learning algorithm showing the recommendation.

Just as an additional piece of information, every other service you are using as of now whether it's Instagram or YouTube or Facebook, or any kind of social networking platform everyone is using a similar type of algorithm more or less.

Clever, but can you imagine doing better? Yes, by using more data. That’s the theme of the future—solving problems by learning from data.


In a brief….

This is what exactly happens on Netflix when you hit that Play button:

  • So many microservices come together to make one large Netflix service as a whole.

  • Content that is legally acquired or licensed is converted into a specific size that fits your screen, under your responsive design, and protected from being copied.

  • Netflix Servers across the world make a copy of it and store it in them so that the closest one of them can deliver the content at max speed and quality.

  • When you select a show or a movie, your Netflix service spontaneously selects which of these servers will it load the video from.

  • Machine learning algorithm selects the best next movie or shows you may want to watch.

It looked so simple before, right? I bet it does. PEACE OUT.


  • By Netflix 2020, Netflix Inc. All rights reserved. "Welcome to Open Connect"

  • By James Niccolai, Deputy News Editor, IDG News Service | MAY 22, 2014 6:10 AM PDT " Behind the curtain: How Netflix streams movies to your TV""

  • By Mayukh Nair | Oct 17, 2017 "How Netflix works: the (hugely simplified) complex stuff that happens every time you hit Play"

  • By LIBBY PLUMMER Tuesday 22 August 2017 ""

  • By WeAreNetflix ""

  • By Vox ""

  • By Netflix TechBlog ""

  • By Savia Lobo ""

  • By Nihit Tandon on 20 Jun 2018 " Open Connect is our, use to access the Internet.

  • All the images are subject to copyright.

426 views0 comments

Recent Posts

See All