Netflix and On Demand Streaming
Something that I wanted to explore is how companies, specifically Netflix, deal with big data and have such quick on demand streaming.
Content Delivery Network (CDN)
Netflix created their own proprietary CDN named Open Connect, which is a Content Delivery Network. This CDN is a network of servers that are spread across the world to deliver movies quickly while also remaining efficient to scale well. A CDN is vital to reduce latency and improve performance by simply serving content from a server that is close to a user.
Open Connect stores Netflix’s content, where they are cached on multiple of these spread apart servers around the world.
A simple way this works is: A user requests content, which is then delivered from the server that is nearest to the user's location (instead of being from a central server which is common practice but not optimal for streaming services).
Edge Servers
Netflix uses Open Connect Appliances (OCAs) which are its own servers that are deployed inside major internet service providers (ISPs) networks across the world.
Local viewing patterns are analyzed. Almost, if not all of Netflix traffic goes through OCAs.
Viewership Patterns
Lots of research has been done to predict popularity of content in certain areas to ensure that content is given priority. This smart content caching is done to preload content on edge servers for current or anticipated demand.
Foundational concepts in networking/web that are most likely used:
Load Balancing Servers
Things need to be taken into account for load balancing such as location, server load, response times. Loads are taken off of certain CDNs by distributing traffic across multiple servers to prevent overwhelming traffic during high traffic time periods.
This load balancing is done by certain algorithms such as: Least Connections (reroute traffic to server with fewest active connections), Least Response Time, Weighted Round Robin, Geolocation-Based Routing.
Content Caching Algorithms
Content is cached on edge servers in priority based on popular popular content, which is based on content caching algorithms.
Trending, new, and most viewed content is preloaded on OCAs in the ISPs data centers.
Algorithms such as Least Recently Used (LRU) and Least Frequently Used (LFU) ensure that infrequently used content is removed/given less priority over content that is higher in demand.
Traffic Steering
User traffic is directed based on multiple factors to ensure quality and fast connections.
i) One factor is geolocation routing, where a user requests content and is delivered from the nearest OCA based on location in order to reduce latency.
ii) Dynamic paths based on network conditions are implemented by monitoring real time congestion, latency, and packet loss to dynamically reroute traffic if an ISP is overloaded or slow during that time period.
IP hashing is done to ensure that subsequent requests from a user are routed to the same server it came from before to ensure that playback is smooth and consistent, and also allows for clients to disconnect/reconnect. This allows for load balancing to improve performance.
https://netflixtechblog.com/
Comments
Post a Comment