How Netflix Works (2024)

How Netflix Works (3)

Ever wondered what goes on behind the scenes of our favorite content streaming service?

Well, you’re in luck as I will explain the Netflix back-end on Amazon Web Services(AWS) and try to simplify it.

Netflix utilizes two cloud services namely Amazon Web services and Open Connect, both of which work smoothly to deliver us as the users exceptional viewing experience.

Open Connect is what Netflix uses as its content delivery network, and will not dive deep into the topic.

How Netflix Works (4)

Netflix supports a wide range of devices ranges from smartphones, smart TVs, PCs, and their different operating systems.

It all starts with you pressing that click button and a request to the Netflix servers which are mainly hosted on AWS is made.

The request together with multiple other requests is forwarded to Amazon's elastic load balance to route to the traffic different EC2 instances.

The load is balanced across different zones which are known as the two-tier balancing scheme.

How Netflix Works (5)

Before a video is made available, preprocessing takes place this ranges from finding errors, converting the video into a different format or resolution, etc, this is known as transcoding.

Transcoding is done to accommodate the various devices supported by the platform, as you can imagine a smartphone needs a smaller resolution and large devices such as smart TVs need a higher resolution.

Files are also optimized according to network speed, when your Internet Service Provider(ISP) is experiencing a slow network then the resolution might be decreased.

If you have very fast speeds, it is only fair that you receive your video in high resolution.

This is achieved by the creation of multiple copies of the same movie, in different resolutions.

A movie might be a 60GB file which is broken down into different chunks which are onboarded into a queue, as they exit the queue they are picked up by different EC2 workers and merged into Amazon S3.

This is a gateway service created by Netflix that provides dynamic routing and monitoring.

How Netflix Works (6)

The request you sent from your device now hits the netty proxy, which sends it to the inbound filter and can be used for authenticating, routing, or decorating this request.

Following this, the request is sent to the end-point filter which is used to return as a static request or forward your request to the back-end services.

Once a response is received from a backend service, the endpoint filter will transfer it to the outbound filters.

The outbound filter performs a process known as GZipping on the content and adds or removes the header. Once the two processes are complete a response is sent back to the netty proxy.

With so many processes happening a fault tolerance mechanism is definitely needed.

How Netflix Works (7)

The above diagram illustrates endpoints in a system, if endpoints 4 and 5 throw errors then the whole system should not suffer, hence a hysterix is used to isolate endpoints.

Simply explained hysterix is an algorithm that decorates microservices also referred to as endpoints in a system.

How Netflix Works (8)

Microservices are key to powering the Netflix API infrastructure, as a user request comes in the call is made to any endpoint, moves on to the other end points through an iterative process.

The microservices can be distributed across different instances using HTTP or Remote Procedure Calls (RPC).

The common issue with a microservice-powered system is any node can fail and the entire system can cascade into failure, how do we control this?

As mentioned above one way is the hysterix algorithm which isolates end points and the other is reducing dependencies on vital nodes.

How Netflix Works (9)
How Netflix Works (10)

Above we have two diagrams, one is of Node A and its dependencies, and the other is Node D and its dependencies.

Comparing the two diagrams we can see that node A has multiple dependencies and Node B only one, hence Node D is the reliable and scalable node on which we can run important services.

With software engineering we should always look at the best and worst case, a system like Netflix crashing should mean at least basic functionalities are available for clients.

Critical endpoints such as search, play, navigation should always be allocated less dependencies.

Another key feature in a failsafe microservice system has stateless endpoints, if an endpoint is down then the user should get a response from any other node/endpoint.

How Netflix Works (11)

EVCache is a custom caching layer owned by Netflix which is based on mamcache D and spymemcache D. It uses multiple clusters deployed on EC2 instances to reduce pressure on the end points.

When the client EVCache system receives reads and writes it distributes them to every node available in that cluster, this means the cache is distributed evenly within the network.

How Netflix Works (12)

Netflix utilizes two different database systems namely MySql and Apache Cassandra.

My SQL is a relational database management system(RDBMS) and Cassandra is NoSql system.

MySql is used to store user information such as billing information, transactions as these need asset compliance.

The rest of the data such as big data and user viewing history is stored in the Cassandra database system.

My SQL has been deployed on Amazon large EC2 instances using a NoDB master to master setup.

How Netflix Works (13)

When a write is made, it is also replicated to the other master node then only an update will be sent for queries that have been made to the master.

Replicas for each and every node are made to handle the scalability and reliability of the RDBMS, these replicas are available locally and across data centers.

When one master node fails DNS configurations is made to redirect queries to the right master.

Apache Cassandra earned its reputation as an open source no sql schema-less database system that can handle large amounts of data.

Netflix adopted this data base management system to handle their big data, as Netflix grew data began to pile up and fill Cassandra nodes.

The ratio of user reads to writes became 9 to 1 prompting the engineering team at Netflix to optimize the database system.

A scheduled job system was developed which separated data into the following; live viewing history and compressed viewing history, with live viewing history being the most recent.

The scheduled jobs compressed the old viewing history which is kept until needed for whatever purpose, recent viewing history is used for building machine learning models.

Apache Chukwa is used for collecting logs from distributed systems, it comes from the Hadoop scalability and robustness.

All logs and events from different parts(Hysterix and inbound filter) within the system are sent to Chukwa.

This data is then visualized and analyzed with the build-in dashboard. Chukwa forwards the data to Amazon S3 and a copy of this data is sent to Apache Kafka.

The data is then routed with Kafkas routing service to various synchronized mechanisms such as Amazon S3, elastic search, and other secondary Kafka.

The events and logs flow through Chukwa, Kafka and the final stop is elastic search.

There are about 150 clusters and 3500 instances that handle elastic search on the AWS backend.

Practical use case of elastic search would be streaming errors experienced by clients; customer service can just search for the error using the customer's details and the error will be visualized, together with details of the error.

Elastic search can also be used to visualize; Sign up, login and keep track of usage.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.htmlhttps://www.loginworks.com/blogs/how-netflix-use-data-to-win-the-race/
https://github.com/Netflix/Hystrix
https://github.com/Netflix/zuul

Join FAUN: Website 💻|Podcast 🎙️|Twitter 🐦|Facebook 👥|Instagram 📷|Facebook Group 🗣️|Linkedin Group 💬| Slack 📱|Cloud Native News 📰|More.

If this post was helpful, please click the clap 👏 button below a few times to show your support for the author 👇

How Netflix Works (2024)

FAQs

How exactly does Netflix work? ›

Netflix is a subscription-based streaming service that allows our members to watch TV shows and movies on an internet-connected device. Depending on your plan, you can also download TV shows and movies to your iOS, Android, or Windows 10 device and watch without an internet connection.

How is Netflix effective? ›

Netflix efficiently uses machine learning in order to help their algorithms learn. This machine learning enables the platform to automate millions of decisions as per the user activities. Without this recommendation engine, people would spend great time for searching their desired movies and TV shows.

How do you explain Netflix to someone? ›

Netflix is a widely used streaming platform that provides different shows, including movies, web series, news, channels, kids' kids', etc. You can take the subscription package at your convenience and budget so your family and friends can enjoy the shows.

Is Netflix 19.99 a month now? ›

Netflix costs $6.99 to $22.99 per month, depending on your subscription plan. It offers three plans: Standard With Ads, Standard and Premium. A former popular choice was the Basic plan at $9.99, but Netflix eliminated this option for new or rejoining members and is phasing it out entirely. Users can cancel anytime.

How does Netflix work without internet? ›

To make sure you always have something to watch offline, use Downloads for You. Downloads for You automatically downloads TV shows and movies we think you might like to your Android phone or tablet, iPhone, or iPad. The Downloads for You feature isn't available on ad-supported Netflix plans.

How does Netflix work and how much does it cost? ›

How much Netflix costs a month. In the US, Netflix currently offers three streaming plans: Standard with Ads, Standard, and Premium, ranging from $7 to $23 monthly. It also costs more to add another user to a subscription plan.

What problem does Netflix solve? ›

Netflix founders Reed Hastings and Marc Randolph wanted to bring customer-centricity to the video rental market. At the time, renting videos was inconvenient and costly, with customers often plagued by expensive late fees. They created an entirely new way to watch movies and consume content.

What are Netflix weaknesses? ›

Weaknesses. Content Acquisition Costs: One of the primary weaknesses of Netflix Inc is the high cost associated with content acquisition and production. As the company strives to maintain its competitive edge through original and exclusive content, it faces increasing expenses that impact its profitability.

What is special about Netflix? ›

Thanks to its sheer variety and number of new things to watch, Netflix also gives you the most bang for your buck. Due to its features, user-friendliness, and robust, variety-filled catalog, Netflix won an Editors' Choice Award for 2023, a distinction previously earned in 2021 and 2022.

What was Netflix originally called? ›

“Kibble.” Believe it or not, “Kibble” is exactly what Netflix co-founders Marc Randolph and Reed Hastings originally called their company before ultimately — and understandably — switching to “Netflix” a short while later.

What makes Netflix different? ›

Netflix's competitive advantage focuses on offering exclusive content that is not available on any other streaming platform. For this purpose, the company invests billions of dollars in creating its own shows and movies, allowing Netflix to differentiate itself from its competitors.

How is Netflix different from others? ›

Netflix is the ONLY streaming service to force it's basic plan subscribers to watch in STANDARD DEFINITION. That's right, HD and UHD are only for higher paying customers.

Can I share my Netflix account with family in a different home? ›

A Netflix account is meant to be shared by people who live together in one household. People who are not in your household will need to use their own account to watch Netflix. Learn more about sharing Netflix. Account owners can buy an extra member slot and invite people outside their household to use Netflix.

Has Netflix changed 2024? ›

Netflix is expected to hike prices on its streaming plans in 2024 — a move that should accelerate its revenue and earnings growth — as it continues to take a bigger bite out of overall TV viewing, according to analysts at UBS Securities.

Which Netflix plan is best? ›

The Standard with ads plan is suitable for occasional viewers, while the Standard plan is ad-free and allows for streaming on multiple devices. The Premium plan is recommended for large families and offers 4K streaming and downloads on up to six devices.

How much does Netflix cost a month? ›

Netflix plans and prices
PlanPriceDetails
Standard with Ads$6.99/mo.View Plans
Standard$15.49/mo.View Plans
Premium$22.99/mo.View Plans

How does Netflix work on your TV? ›

Using a Smart TV
  1. Connect your Smart TV to your home network.
  2. Open your Smart TV apps.
  3. Select the Netflix app.
  4. Log in with your Nextflix Account.
  5. Select a video to play.
Sep 20, 2023

How do I use Netflix for the first time? ›

Smart TV and Streaming Media Players
  1. Open the Netflix app. ...
  2. On most smart TVs and streaming media players, you will need to start by providing your email address or phone number. ...
  3. Choose the plan that's right for you. ...
  4. Create an account by entering your email address and creating a password.
  5. Enter a payment method.

Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6006

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.