SlideShare a Scribd company logo
MicroServices at NETFLIX
Best Practices & Tools of the trade
Sudhir Tonse
Manager, Cloud Platform
@stonse
http://linkedin.com/in/sudhirtonse
Nitesh Kant
Platform Architect
@NiteshKant
http://linkedin.com/in/niteshkant
● Old DataCenter
(2008)
● Everything in
one WebApp
(.war)
● AWS Cloud
(2012)
● 100s of Fine
Grained
Services
Positives
● Isolation brings better Availability*
● Independent Speed of Delivery (by different
teams)
● Decentralized Governance (DevOps)
Challenges
Distributed Systems are inherently Complex
Operational Overhead (100s of services; DevOps model absolutely required)
Service Interface Versioning, Mismatches?
Testing (Need the entire ecosystem to test)
Fan out of Requests -> Increases n/w traffic
Claim
MicroServices increase your overall availability
True?
Yes … but wait!
One missing “;” brought down ALL
of Netflix
Introduced MicroServices ...
Uptime SLA
Assume a Monolithic Service with 99.99%
availability
What if you have ...
~30 Microservices (each with 99.99% SLA)??
Reality
One rogue (dependency) micro service CAN
bring your whole site down!
How?
Service Hosed!!
Combined Effective SLA (Availability)
== 2 HOURS of downtime per month
== 99.7 % uptime!!
But what if I want better?
MicroServices does not automatically mean
better Availability
- Unless you have Fault Tolerant
Architecture
Guard your Service!
Use Hystrix (http://github.com/netflix/hystrix)
Service Discovery & Loadbalancers
Choice
1. Central Loadbalancer? (H/W or S/W)
OR
2. Client based S/W Loadbalancer?
Client based Smart Loadbalancer
Use Ribbon (http://github.com/netflix/ribbon)
Tools of the Trade
OR
Service Dependency View
Distributed Tracing
Chattiness (and Fan Out)
~2 Billion Requests per day on Edge Service
…
Results in ~20 Billion Fan out requests in ~100
MicroServices
Fan out
IPC 2.0 .. the next frontier
@NiteshKant
Netflix IPC Stack (1.0)
A
p
a
c
h
e
H
T
T
P
C
l
i
e
n
t
Eureka (Service Registry)
Server (Karyon)
Apache
Tomcat
Client
H
y
s
t
r
i
x
E
V
C
a
c
h
e
Ribbon
Load
Balancing
Eureka
Integration
Metrics
(Servo)
Bootstrapping (Governator)
Metrics (Servo)
Admin ConsoleHTTP
Eureka Integration
Registration
Fetch Registry
Netflix IPC Stack (2.0)
Client (Ribbon 2.0)
Eureka (Service Registry)
Server (Karyon)
Ribbon Transport
Load
Balancing
Eureka
Integration
Metrics
(Servo)
Bootstrapping (Governator)
Metrics (Servo)
Admin Console
HTTP
Eureka Integration
Registration
Fetch Registry
Ribbon
Hystrix
EVCache
R
x
N
e
t
t
y
RxNetty
UDP
TCP
WebSockets
SSE
Synchronous Applications
Tomcat
Connector Application code Hystrix
Apache HTTP
Client
Conn 1Thread 1 Thread 1’
Thread
1*
Thread 1’
Conn 2Thread 2 Thread 2’
Thread
2*
Thread 2’
Conn nThread n Thread n’
Thread
n*
Thread n’
……....
*If there isn’t any application driven thread change
Synchronous Applications
Tomcat
Connector Application code Hystrix
Apache HTTP
Client
Conn 1Thread 1 Thread 1’
Thread
1*
Thread 1’
Conn 2Thread 2 Thread 2’
Thread
2*
Thread 2’
Conn nThread n Thread n’
Thread
n*
Thread n’
……....
Large # of connections / Large # of external dependencies => tons of threads.
*If there isn’t any application driven thread change
Asynchronous applications
Application code RxNettyHystrixRxNetty
Eventloop 1 Eventloop 4
Eventloop 1*
Eventloop 4*
*If there isn’t any application driven thread change
“N” connections per eventloop
Request processing in Eventloop
Hystrix used for throttling not for achieving asynchronicity.
Eventloops are shared between In & OUT
Asynchronous Applications
Application code RxNettyHystrixRxNetty
Eventloop 1 Eventloop 4
Eventloop 1*
Eventloop 4*
*If there isn’t any application driven thread change
Eventloop 2 Eventloop 3
Eventloop 1*
Eventloop 4*
……....
Eventloop 4 Eventloop 1
Eventloop 1*
Eventloop 4*
# of processors => # of eventloops. No dependence on # of connections
Takeaway
MicroServices is a better architecture
compared to Monolithic Apps
However
Beaware of the challenges - Use Best Practices
and battle-tested OSS components
http://netflix.github.co

More Related Content

PDF
Azure DevOps Presentation
PPTX
DevOps introduction
PPTX
Modern CI/CD Pipeline Using Azure DevOps
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
PPTX
Introduction to Azure DevOps
PPTX
Azure DevOps
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
PPTX
Azure Pipelines
Azure DevOps Presentation
DevOps introduction
Modern CI/CD Pipeline Using Azure DevOps
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Introduction to Azure DevOps
Azure DevOps
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Azure Pipelines

What's hot (20)

PDF
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
PDF
Welcome to Azure Devops
PPTX
Introduction to DevOps
PPTX
Azure Cost Management
PDF
Microservices Design Patterns | Edureka
PPTX
Micro services Architecture
PDF
Docker 101: Introduction to Docker
PDF
DevOps Powerpoint Presentation Slides
PPTX
Azure Migrate
PPTX
Introduction to DevOps
PDF
The Layman's Guide to Microsoft Azure
PDF
Azure Monitoring Overview
PPTX
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
PPTX
Monoliths and Microservices
PPTX
Cloud Migration, Application Modernization, and Security
PPT
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
PDF
Microservices for Application Modernisation
PDF
Designing a complete ci cd pipeline using argo events, workflow and cd products
PDF
Microservice Architecture
PPTX
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Devops Strategy Roadmap Lifecycle Ppt Powerpoint Presentation Slides Complete...
Welcome to Azure Devops
Introduction to DevOps
Azure Cost Management
Microservices Design Patterns | Edureka
Micro services Architecture
Docker 101: Introduction to Docker
DevOps Powerpoint Presentation Slides
Azure Migrate
Introduction to DevOps
The Layman's Guide to Microsoft Azure
Azure Monitoring Overview
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Monoliths and Microservices
Cloud Migration, Application Modernization, and Security
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
Microservices for Application Modernisation
Designing a complete ci cd pipeline using argo events, workflow and cd products
Microservice Architecture
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Ad

Viewers also liked (17)

PPTX
From SOA to MSA
PPTX
Modern Enterprise integration Strategies
PPTX
Mastering Chaos - A Netflix Guide to Microservices
PPTX
Application Networks: Microservices and APIs at Netflix
PDF
MicroService Architecture
PPTX
モブプログラミングを体験しよう at Agile Japan 2017 愛媛サテライト
PDF
マイクロサービス運用の所感 #m3dev
PDF
Microservices for Enterprises
PDF
サイボウズのフロントエンド開発 現在とこれからの挑戦
PDF
遅いクエリと向き合う仕組み #CybozuMeetup
PDF
サイボウズのサービスを支えるログ基盤
PPTX
すべての人にチームワークを サイボウズのアクセシビリティ
PDF
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
PDF
マイクロサービスアーキテクチャ - アーキテクチャ設計の歴史を背景に
PDF
あなたの開発チームには、チームワークがあふれていますか?
PDF
シリコンバレーの「何が」凄いのか
From SOA to MSA
Modern Enterprise integration Strategies
Mastering Chaos - A Netflix Guide to Microservices
Application Networks: Microservices and APIs at Netflix
MicroService Architecture
モブプログラミングを体験しよう at Agile Japan 2017 愛媛サテライト
マイクロサービス運用の所感 #m3dev
Microservices for Enterprises
サイボウズのフロントエンド開発 現在とこれからの挑戦
遅いクエリと向き合う仕組み #CybozuMeetup
サイボウズのサービスを支えるログ基盤
すべての人にチームワークを サイボウズのアクセシビリティ
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
マイクロサービスアーキテクチャ - アーキテクチャ設計の歴史を背景に
あなたの開発チームには、チームワークがあふれていますか?
シリコンバレーの「何が」凄いのか
Ad

Similar to MicroServices at Netflix - challenges of scale (20)

PDF
Containers, orchestration and security, oh my!
PPTX
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
PPTX
Support of containerized workloads in ONAP
PPTX
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
PDF
Load Balancing in the Cloud using Nginx & Kubernetes
PDF
Building Your Docker Tech Stack
PDF
Building your production tech stack for docker container platform
PDF
IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...
PDF
Istio: Using nginMesh as the service proxy
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
PPTX
OpenStack Introduction
PPTX
OpenStack Collaboration made in heaven with Heat, Mistral, Neutron and more..
PDF
Observability foundations in dynamically evolving architectures
PPTX
Azure Service Fabric: The road ahead for microservices
PDF
Tungsten Fabric Overview
PDF
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
PPTX
Introduction to Istio for APIs and Microservices meetup
PDF
Devoxx university - Kafka de haut en bas
PPTX
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
PDF
K. Tzoumas & S. Ewen – Flink Forward Keynote
Containers, orchestration and security, oh my!
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Support of containerized workloads in ONAP
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Load Balancing in the Cloud using Nginx & Kubernetes
Building Your Docker Tech Stack
Building your production tech stack for docker container platform
IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...
Istio: Using nginMesh as the service proxy
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
OpenStack Introduction
OpenStack Collaboration made in heaven with Heat, Mistral, Neutron and more..
Observability foundations in dynamically evolving architectures
Azure Service Fabric: The road ahead for microservices
Tungsten Fabric Overview
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
Introduction to Istio for APIs and Microservices meetup
Devoxx university - Kafka de haut en bas
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
K. Tzoumas & S. Ewen – Flink Forward Keynote

More from Sudhir Tonse (9)

PPTX
Big Data Pipelines and Machine Learning at Uber
PDF
ML and Data Science at Uber - GITPro talk 2017
PDF
Stream Computing & Analytics at Uber
PPTX
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
PPTX
Big Data Pipeline and Analytics Platform Using NetflixOSS and Other Open Sour...
PPTX
Big Data Pipeline and Analytics Platform
PDF
Architecting for the Cloud using NetflixOSS - Codemash Workshop
PPTX
Web Scale Applications using NeflixOSS Cloud Platform
PDF
Netflix Cloud Platform Building Blocks
Big Data Pipelines and Machine Learning at Uber
ML and Data Science at Uber - GITPro talk 2017
Stream Computing & Analytics at Uber
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Big Data Pipeline and Analytics Platform Using NetflixOSS and Other Open Sour...
Big Data Pipeline and Analytics Platform
Architecting for the Cloud using NetflixOSS - Codemash Workshop
Web Scale Applications using NeflixOSS Cloud Platform
Netflix Cloud Platform Building Blocks

Recently uploaded (20)

PPT
Project quality management in manufacturing
DOCX
573137875-Attendance-Management-System-original
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Digital Logic Computer Design lecture notes
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
PPTX
CH1 Production IntroductoryConcepts.pptx
PPT
Drone Technology Electronics components_1
PPTX
Construction Project Organization Group 2.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
composite construction of structures.pdf
PPTX
additive manufacturing of ss316l using mig welding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
Project quality management in manufacturing
573137875-Attendance-Management-System-original
bas. eng. economics group 4 presentation 1.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Digital Logic Computer Design lecture notes
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
CH1 Production IntroductoryConcepts.pptx
Drone Technology Electronics components_1
Construction Project Organization Group 2.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
composite construction of structures.pdf
additive manufacturing of ss316l using mig welding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Operating System & Kernel Study Guide-1 - converted.pdf

MicroServices at Netflix - challenges of scale

  • 1. MicroServices at NETFLIX Best Practices & Tools of the trade Sudhir Tonse Manager, Cloud Platform @stonse http://linkedin.com/in/sudhirtonse Nitesh Kant Platform Architect @NiteshKant http://linkedin.com/in/niteshkant
  • 2. ● Old DataCenter (2008) ● Everything in one WebApp (.war) ● AWS Cloud (2012) ● 100s of Fine Grained Services
  • 3. Positives ● Isolation brings better Availability* ● Independent Speed of Delivery (by different teams) ● Decentralized Governance (DevOps)
  • 4. Challenges Distributed Systems are inherently Complex Operational Overhead (100s of services; DevOps model absolutely required) Service Interface Versioning, Mismatches? Testing (Need the entire ecosystem to test) Fan out of Requests -> Increases n/w traffic
  • 5. Claim MicroServices increase your overall availability
  • 7. One missing “;” brought down ALL of Netflix
  • 9. Uptime SLA Assume a Monolithic Service with 99.99% availability What if you have ... ~30 Microservices (each with 99.99% SLA)??
  • 10. Reality One rogue (dependency) micro service CAN bring your whole site down!
  • 11. How?
  • 13. Combined Effective SLA (Availability) == 2 HOURS of downtime per month == 99.7 % uptime!!
  • 14. But what if I want better? MicroServices does not automatically mean better Availability - Unless you have Fault Tolerant Architecture
  • 15. Guard your Service! Use Hystrix (http://github.com/netflix/hystrix)
  • 16. Service Discovery & Loadbalancers Choice 1. Central Loadbalancer? (H/W or S/W) OR 2. Client based S/W Loadbalancer?
  • 17. Client based Smart Loadbalancer Use Ribbon (http://github.com/netflix/ribbon)
  • 18. Tools of the Trade OR
  • 21. Chattiness (and Fan Out) ~2 Billion Requests per day on Edge Service … Results in ~20 Billion Fan out requests in ~100 MicroServices
  • 23. IPC 2.0 .. the next frontier @NiteshKant
  • 24. Netflix IPC Stack (1.0) A p a c h e H T T P C l i e n t Eureka (Service Registry) Server (Karyon) Apache Tomcat Client H y s t r i x E V C a c h e Ribbon Load Balancing Eureka Integration Metrics (Servo) Bootstrapping (Governator) Metrics (Servo) Admin ConsoleHTTP Eureka Integration Registration Fetch Registry
  • 25. Netflix IPC Stack (2.0) Client (Ribbon 2.0) Eureka (Service Registry) Server (Karyon) Ribbon Transport Load Balancing Eureka Integration Metrics (Servo) Bootstrapping (Governator) Metrics (Servo) Admin Console HTTP Eureka Integration Registration Fetch Registry Ribbon Hystrix EVCache R x N e t t y RxNetty UDP TCP WebSockets SSE
  • 26. Synchronous Applications Tomcat Connector Application code Hystrix Apache HTTP Client Conn 1Thread 1 Thread 1’ Thread 1* Thread 1’ Conn 2Thread 2 Thread 2’ Thread 2* Thread 2’ Conn nThread n Thread n’ Thread n* Thread n’ …….... *If there isn’t any application driven thread change
  • 27. Synchronous Applications Tomcat Connector Application code Hystrix Apache HTTP Client Conn 1Thread 1 Thread 1’ Thread 1* Thread 1’ Conn 2Thread 2 Thread 2’ Thread 2* Thread 2’ Conn nThread n Thread n’ Thread n* Thread n’ …….... Large # of connections / Large # of external dependencies => tons of threads. *If there isn’t any application driven thread change
  • 28. Asynchronous applications Application code RxNettyHystrixRxNetty Eventloop 1 Eventloop 4 Eventloop 1* Eventloop 4* *If there isn’t any application driven thread change “N” connections per eventloop Request processing in Eventloop Hystrix used for throttling not for achieving asynchronicity. Eventloops are shared between In & OUT
  • 29. Asynchronous Applications Application code RxNettyHystrixRxNetty Eventloop 1 Eventloop 4 Eventloop 1* Eventloop 4* *If there isn’t any application driven thread change Eventloop 2 Eventloop 3 Eventloop 1* Eventloop 4* …….... Eventloop 4 Eventloop 1 Eventloop 1* Eventloop 4* # of processors => # of eventloops. No dependence on # of connections
  • 30. Takeaway MicroServices is a better architecture compared to Monolithic Apps However Beaware of the challenges - Use Best Practices and battle-tested OSS components