NETFLIX System design| How Money Heist Movie Played In Netflix| System Design Interview|InterviewDOT
Channel: Interview DOT
Date: 2020-05-04

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications.

Tamil NETFLIX System design | Media Streaming Platform | System Design Interview Question | InterviewDOT

Netflix is one the largest on-demand video streaming service over the internet. Netflix allows users to stream and watch videos which are available on its platform. Let try to design a system similar to Netflix.

CDN Stands for Content Delivery Network. CDN is a highly-distributed platform with many servers which separated globally. The web content delivers to the end-user based on the regional location of the user. And also based on the origin webpage, the CDN server.

CDN Service is viable in speeding the delivery of website content. CDN also increases traffic which leads websites to global reach. The user gets the faster content to deliver by the closest CDN server. CDNs also provide security and protection from large streams in traffic.

What is Netflix Open Connect?
Open Connect is the name of the global network that is responsible for delivering Netflix
TV shows and movies to our members world-wide. This type of network is typically
referred to as a “Content Delivery Network” or “CDN” because its job is to deliver
internet-based content (via HTTP/HTTPS) efficiently by bringing the content that people
watch close to where they’re watching it. 

Open Connect stores Netflix video in different locations throughout the world. When you press play the video streams from Open Connect, into your device, and is displayed by the client.
CDN — A content delivery network (CDN) is a system of distributed servers (network) that deliver pages and other Web content to a user, based on the geographic locations of the user, the origin of the webpage and the content delivery server.

What is transcoding process ?
Transcoding is the process that converts a video file from one format to another, to make videos viewable across different platforms and devices.

Detailed Component Design
Users Service
Subscriptions Service
Videos Service
Transcoder Service
Search Service

APIs
User Sign-up
User Sign-in
User Sign-out
Subscribe
Unsubscribe
Get Videos
Search Videos
Get Video
Upload Video

Performance
Caching
CDN

Scalability
Horizontal Scaling
Database Replication
Database Sharding
Cache Sharding
Search Database Sharding

Functional Requirements
Users should be able to create and account and subscribe for a plan.
Users should be able to manage multiple profiles.
Users should be able to search for a video title.
Users should be able to watch a video.
Netflix employees should be able to upload a video from backend to make it available on Netflix platform.

Users Service
Users Service would be mainly responsible for user authentication and profiles. This service would persist the data in a relational database like MySQL or PostgreSQL.

Subscriptions Service
Subscriptions Service would be used to manage the subscription of the users. Since data processed by this service are highly transactional in nature, RDBMS makes a suitable choice.

Videos Service
Videos Service would be responsible for surfacing videos to end users. This service will store videos metadata in a RDBMS like MySQL or PostgreSQL. However for quick response time, this service would implement a write-around cache. This can be implemented using a in-memory cache like Redis or Memcached.

Transcoder Service
Transcoder Service is one of the key backend service. This service would be responsible for following:

Checking the quality of uploaded videos (frame drops etc.)
Compressing the video with different codecs
Creating different resolutions of the video

Search Service
Search Service would enable end users to search for a video using metadata like title, summary etc. This service would be backed by a database supporting full text search. Elasticsearch or Solr can be used for for the same as both these support full text searching. This service can also rank the results based on recency and popularity for better user experience.

ELB:
Netflix uses Amazons Elastic Load Balancer (ELB) service to route traffic to our front-end services. ELB’s are set up such that load is balanced across zones first, then instances. This is because the ELB is a two-tier load balancing scheme.
The first tier consists of basic DNS based round robin load balancing. This gets a client to an ELB endpoint in the cloud that is in one of the zones that your ELB is configured to use.
The second tier of the ELB service is an array of load balancer instances (provisioned directly by AWS), which does round-robin load balancing over our own instances that are behind it in the same zone.