Serving 200 Million Online Subscribers – The Netflix Way

netflix microservices architecture

Have you ever imagined what happens when you click the Play button on Netflix? Have you ever imagined the technical architecture that top brands use to support their highly resilient internet-facing platforms?

To be able to server over 200 million subscriber Netflix has built an amazing subscription-based video steaming platform. Their service accounts for 15% of the world’s Internet bandwidth – so it is needless to emphasise the importance of 100% service availability and global scalability.

It’s fascinating to learn that the technical architecture behind all this is not so complex. This article sheds so light into the microservices architecture used by Netflix. It is based on the article by Cao Duc Nguyet A Design Analysis of Cloud-based Microservices Architecture at Netflix

The architecture is a great example of how to build microservices in the cloud, how we can leverage cloud API gateways (AWS in this case) and provide true configuration-based API facades. Each microservice can have its own datastore and some in-memory cache stores of recent results (EVCache in this case). It first tries to pull latest from cache else makes a call to data store.

So let’s check the 8 steps of what happens inside the Netllix’s microservices architecture when you click the Play button.

1. Client sends a Play request to Backend running on AWS. The request is handled by AWS Load balancer (ELB)

2. AWS ELB will forward that request to API Gateway Service running on AWS EC2 instances. That component, named Zuul, is built by the Netflix team to allow dynamic routing, traffic monitoring & security, etc

3. Application API component is the core business logic, in this scenario, the forwarded request from API Gateway Service is handled by Play API.

4. Play API will call a microservice or a sequence of microservices to fulfill the request.

5. Microservices are mostly stateless small programs, to control its cascading failure & enable resilience, each microservice is isolated from the caller processes by Hystrix.

6. Microservices can save to or get data from a data store during its process.

7. Microservices can send events for tracking user activities or other data to the Stream Processing Pipeline for either real-time processing of personalized recommendation.

8. The data coming out of the Stream Processing Pipeline can be persistent to other data stores such as AWS S3, Hadoop HDFS, Cassandra, etc.

#kafka #confluent #apachekafka #microservices #microservicesarchitecture #architecture #netflix #automation #businessintelligence #microservices #dataculture #hadoop #microservices #bigdata #awscloud #architecturedesign #cloud #pipelinemanagement

Further Reading? If you want to know more about the microservices architecture used at Netflix here are some interesting links to read.

NETFLIX system design by Narendra L

Featuring Apache Kafka in the Netflix Studio and Finance World

Chaos Monkey: A Beginner’s Guide

Here is also an interesting video on the subject “Mastering Chaos – A Netflix Guide to Microservices”