Netflix — Why does it not buffer ?
Ever thought why Netflix with millions of users and a huge workload never buffers and work seamlessly ?
MicroService Architecture: Netflix follows the microservice architecture which means that the application is composed up of many small and independent services that are able to communicate with each other through set of APIs. They are rapid, easily deployable, loosely coupled, and reliable. Here in Netflix each service performs a specific function, such as billing, encoding, recommendation or authentication. In this architecture, services should be independent of each other, like if the video storage service should be decoupled with service responsible for transcoding videos. To make it reliable — — ?? Separate out the critical services, treat servers as stateless.
Cloud Computing: Netflix runs its microservices on the cloud, using platforms such as AWS and Google Cloud. This allows Netflix to scale up or down its services as per the demand, and handle errors and failures.
Adaptive Bitrate Streaming (ABR): Netflix uses ABR to adjust the quality and bitrate of the content based on user’s device, resolution, and network speed. ABR allows Netflix to provide a smooth and seamless experience to the user, even if their network conditions degrade or vary. ABR works by dividing the contents into small chunks of different bitrates or resolution, and switching between them as per needed. They also use predictive algorithms and feedback mechanisms to optimize streaming quality and performance.
Content Delivery Network (CDN): Netflix uses its own CDN, called Open Connect, which consists of thousands of serves located in hundreds of geolocations across the world. These servers store and cache the content, and deliver it to the user based on their geographical proximity and network conditions. For ex: A person accessing Netflix from California will have a different server serving the content than to the person from EU. This reduces latency and bandwidth costs of streaming, and improves availability and quality of the content.
How do NETFLIX Scale ?
Edge Computing: Netflix leverages edge computing to move some of the computations and processing closer to the users, rather than relying on centralized servers. It reduces latency, network congestion, and improves the user experience. For ex: Netflix uses edge devices to do encryption, decryption, caching, transcoding and compression.
Load Balancing: Netflix uses load balancing to distribute the incoming requests and traffic among multiple servers, instances or geos. It helps to balance the load and avoid overutilization or under utilization of its resources. It also helps achieves fault tolerance, by rerouting traffic in case of outages. For ex: Netflix uses load balancing while handling peak content demand during new content release.
Data Partitioning: Netflix partitions data into smaller and messagable chunks, and distribute them across different servers, databases and regions. It helps Netflix to improve the performance, availability and scalability of its data storage and access. For ex: Netflix uses the concept of data partitioning to store and review user profiles, viewing history, ratings and recommendations.
— — Arpita Gupta, SDE Microsoft