We recently had our Brown Bag session, where we covered a comprehensive case study on Netflix. The online streaming service has seen robust growth in the past few years and is now the epitome of online streaming services, which makes it a perfect subject for our case study.
Reed Hastings and Marc Randolph started, Netflix in 1997 as a DVD rental service on pay-per-rent model. In the beginning, they had their fair share of challenges. Back then, to be the top subscription-based online streaming company in the world was only a dream.
In 2000, Hastings and Randolph offered to sell Netflix to Blockbuster for just $50 million. But the Blockbuster CEO refused. Later on, Blockbuster went out of business, but Netflix has approximately 223 million paid subscribers spread across 190+ countries. The subscribers spend over 165 million, hours watching over 4,000 movies and 47,000 episodes daily. An average user watches 3.2 hours of Netflix per day.
The stats are incredible. But how does Netflix manage online streaming for the its mass audience?
Netflix uses several technologies to provide the services over its app:
When the demand increased, Netflix invented its in-house Content Delivery Network (CDN)— Open Connect Appliances (OCAs). This helped the steaming platform work with ISPs (Internet Service Provider Networks) collaboratively. The OCAs were placed inside Internet service providers to store copies of Netflix content. It optimized storage and enabled swift video streaming services worldwide. When a client requests a particular video, the CDN caters to the client’s request.
Here’s the architecture of Netflix’s online streaming services:
Here’s how the Playback Architecture of Netflix works:
1st diagram: OCAs constantly send a health report, workload status, routability, available videos, and cache to cache control services at the back end.
2nd diagram: A user on a client device requests playback of a TV show or a movie from the Netflix application to AWS
3rd diagram: The playback application services in AWS check user authorization and licensing. Then they determine which specific files are requested at the client’s end.
4th diagram: AWS uses the information stored by the cache control services to pick OCAs to deliver the required files. Then generates the URL for those OCAs and hands over the URL to the client.
5th diagram: A list of OCAs URLs is sent by playback app services. The client selects one URL and sends the request.
6th diagram: OCAs accept the request from the client and starts streaming.
Client Server Architecture (CSA)
Let’s understand how Netflix’s client-server architecture works.
The CSA works based on two requests:
First Request:
The first API (Application Interface Programme) call is the playback Security API call. It establishes if the user is a paid subscriber or not. And at the same time, the Netflix content control plane (another Netflix Server) continuously checks the OCA’s’ health to determine the network that will deliver the fastest service. Hence, the OCA servers don’t crash.
Second Request:
After the best OCA is selected and the user is authorized, the client calls the Content Discovery API. To this request, the server returns a personalized feed of movies or web series inside the Netflix app. All of this passes through the load balancer so that servers don’t crash due to load.
All the API requests are handled by individual microservices. Netflix uses a self-created library called Hystrix. The library helps isolate points of access to different micro-services so they don’t interfere with each other. If one microservice goes down, the rest of the system still works.
For instance, while you’re on a Netflix discovery feed and the microservice that helps you search for content goes down/becomes faulty. When you try to search for something, it doesn’t fetch results. But you would still be able to watch the movie displayed on your discovery feed because Hystrix has isolated that search engine failure for you.
What inspiration can we draw from Netflix?
Never give up – Netflix didn’t give up when Blockbuster refused to buy it.
Keep re-inventing yourself – Netflix re-invented itself when other businesses were crashing.
Keep innovating – Netflix innovated its own assets to stay at the top of its business industry. Its content delivery network and other libraries deliver seamless video streaming worldwide.
No Comments