SlideShare a Scribd company logo
The Netflix API for a
global service
Katharina Probst
Engineering Manager, API
DevNexus, February 2016
What is Netflix?
Stream TV
shows and
movies
anywhere,
any time.
Global!
(except China and where we can’t operate for legal reasons)
Netflix
Originals
Scale
❏ Peak
downstream
traffic in the
US is 37%,
upstream
almost 7%.
❏ 75 Million subscribers worldwide and growing
Source: http://www.sandvine.com/news/global_broadband_trends.asp
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future directions
API
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future directions
API
API
Personali-
zation
Engine
User
Info
Ratings
Similar
Movies
A/B Test
Engine
….
ELB
Zuul
(gateway)
RxJava Hystrix
JavaService
Layer
Mid-tier
Services
UI
Teams
Client Server
Internet
Application
/tv/home
API
Team
Service
Teams
What is the API used
for?
Examples:
❏ Discovery
❏ Recommendations
❏ Move metadata
❏ Ratings
❏ Sign-up and Profiles
❏ Playback
❏ Bookmarks
❏ DRM
❏ A/B testing
API
Direct dependencies on other services
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future directions
API
Hystrix Primer
❏ Protection from and control over
latency and failure from dependencies
❏ Stop cascading failures in a complex
distributed system
❏ Fall back and gracefully degrade
❏ Fail fast and rapidly recover
https://github.com/Netflix/Hystrix
API
Personali-
zation
Engine
User
Info
Ratings
Similar
Movies
A/B Test
Engine
….
API
Personali-
zation
Engine
User
Info
Ratings
Similar
Movies
A/B Test
Engine
….
Don’t let this
happen.
API
Personali-
zation
Engine
User
Info
Ratings
Similar
Movies
A/B Test
Engine
….
Don’t let this
happen.
Fallback
Response
Do this
instead.
API
Personali-
zation
Engine
User
Info
Ratings
Similar
Movies
A/B Test
Engine
….
Failure
Injection
Testing
(FIT)
Goal: Study how the
system behaves when
a failures occur (e.g.,
backend service
unreachable).
More automated failure testing
Goal: Find groups of service calls that are needed for
success.
http://techblog.netflix.com/2016/01/automated-failure-testing.html
Autoscaling & Capacity Management
http://nflx.it/1LvqLUi
Autoscaling & Capacity Management
❏ Red: traffic for current week (x-axis)
❏ Black: traffic for previous week for comparison
❏ What happened on February 7? Superbowl!
AWS Controls Reactive, does not
scale up fast enough
Fine-grained Control with Scryer
Complements AWS Controls
❏ Faster scale-up, improved cost
❏ Use reactive policy for organic scale down
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future directions
API
Lots of devices, lots of variety
Different interaction models
And just to make things a little more
interesting….
❏ A/B tests
❏ profiles
❏ localization
Add server-side scripting capability
❏ Reduce network chattiness
❏ Support device optimizations
❏ Enable faster development for internal users
Discrete HTTP requests pay network tax repeatedly
Single, optimized request; pay network tax once
Client data
assembly logic
pushed to server
Local MethodRemote API
GET
/users/{user_id}/lists
getLists(userId)
❏ UI (script) changes can happen
independently
❏ Script changes can be pushed to running
servers, so decoupled from API push
schedule
❏ Decoupling leads to greater developer
velocity
Impact on velocity and collaboration
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future directions
API
Run 1% of your traffic on the new
code and see how it does
❏ Errors: 2xx, 4xx, 5xx
❏ latency
❏ network
❏ busy threads
❏ load, memory consumption
❏ ...
So you’ve run a canary. Now what?
Control Canary
The Netflix API for a global service
Successful canary
red/black push
Continuous Delivery with Spinnaker
http://techblog.netflix.com/2015/09/moving-from-asgard-to-spinnaker.html
Quickly see status of all clusters
http://techblog.netflix.com/2015/09/moving-from-asgard-to-spinnaker.html
Prod is a little different….
The things you can do
… with server groups … with instances
Script Management
The Netflix API for a global service
Operations
Operations
Operations
Real-time analysis
http://www.slideshare.net/g9yuayon/qcon-talk-on-netflix-mantis-a-stream-processing-system
Submit a query, see requests in real time.
Netflix API
❏ Architecture
❏ Resiliency
❏ Developer velocity
❏ Tooling and DevOps
❏ Current and future
directions
API
● > 900 active
endpoints
● ~60 direct
dependencies
● 78 thread pools
● 1000+ threads
● high memory usage
What we’ve
grown to
Script isolation & node
❏ Groovy scripts run as
part of API process
❏ UI teams would like to
use other languages
(in particular node.js)
var response = model.get("todos[0..2]
['name','done']");
API remote
service layer
Client libs
UI/device
scripts (node)
Falcor
Services
Thin client libraries
❏ Fat client libraries
❏ business logic and
have
❏ multiple dependencies
❏ Move business logic and
dependencies to services
API remote
service layer
Thin client libs
UI/device
scripts (node)
Falcor
Services
Remove metadata from API servers
❏ Metadata takes up
significant memory
in API servers
❏ Challenge: reduce
chattiness to
metadata
Metadata
Service
API remote
service layer
Thin client libs
UI/device
scripts (node)
Falcor
Services
In the beginning...

More Related Content

What's hot (18)

PDF
API World 2013 - Transforming the Netflix API
Benjamin Schmaus
 
PPTX
Engineering Netflix Global Operations in the Cloud
Josh Evans
 
PPTX
Rethinking Cloud Proxies
Mikey Cohen - Hiring Amazing Engineers
 
PPTX
Microservices at Netflix
Katharina Probst
 
PDF
Infrastructure as code
Aakash Singhal
 
PPTX
Vulnerability Discovery in the Cloud
DevOps.com
 
PDF
Scalable Microservices at Netflix. Challenges and Tools of the Trade
C4Media
 
PPTX
I Don't Test Often ...
Gareth Bowles
 
PDF
How Netflix Directs 1/3rd of Internet Traffic
C4Media
 
PDF
Frail & Cast Iron tools - a Postman Case Study
Postman
 
PDF
Lessons Learned from building a serverless API
Pam Rucinque
 
PDF
Building Cloud-agnostic Serverless APIs
Postman
 
PDF
Infrastructure as Code
Prasant Kumar
 
PDF
Using Postman to Automate API On-Boarding
Postman
 
PPTX
Building a massively scalabale cloud service from grounds up
Baruch Sadogursky
 
PDF
Postman Galaxy Tour: San Francisco - Workshop Presentation
Postman
 
PDF
Getting Ahead of Engineering
Postman
 
PDF
Emulators as an Emerging Best Practice for API providers
Postman
 
API World 2013 - Transforming the Netflix API
Benjamin Schmaus
 
Engineering Netflix Global Operations in the Cloud
Josh Evans
 
Rethinking Cloud Proxies
Mikey Cohen - Hiring Amazing Engineers
 
Microservices at Netflix
Katharina Probst
 
Infrastructure as code
Aakash Singhal
 
Vulnerability Discovery in the Cloud
DevOps.com
 
Scalable Microservices at Netflix. Challenges and Tools of the Trade
C4Media
 
I Don't Test Often ...
Gareth Bowles
 
How Netflix Directs 1/3rd of Internet Traffic
C4Media
 
Frail & Cast Iron tools - a Postman Case Study
Postman
 
Lessons Learned from building a serverless API
Pam Rucinque
 
Building Cloud-agnostic Serverless APIs
Postman
 
Infrastructure as Code
Prasant Kumar
 
Using Postman to Automate API On-Boarding
Postman
 
Building a massively scalabale cloud service from grounds up
Baruch Sadogursky
 
Postman Galaxy Tour: San Francisco - Workshop Presentation
Postman
 
Getting Ahead of Engineering
Postman
 
Emulators as an Emerging Best Practice for API providers
Postman
 

Similar to The Netflix API for a global service (20)

PPTX
Move Fast;Stay Safe:Developing & Deploying the Netflix API
Sangeeta Narayanan
 
PDF
The new Netflix API
Katharina Probst
 
PPTX
Maintaining the Netflix Front Door - Presentation at Intuit Meetup
Daniel Jacobson
 
PPTX
Maintaining the Front Door to Netflix
Benjamin Schmaus
 
PDF
Gluecon 2013 netflix api crash course
Benjamin Schmaus
 
PDF
The Netflix API Platform for Server-Side Scripting
Katharina Probst
 
PPTX
Netflix Cloud Architecture and Open Source
aspyker
 
PDF
Netflix Architecture and Open Source
All Things Open
 
ZIP
Performance and Fault Tolerance for the Netflix API
Ben Christensen
 
PPTX
Presentation to ESPN about the Netflix API
Daniel Jacobson
 
PDF
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Amer Ather
 
PDF
20140708 - Jeremy Edberg: How Netflix Delivers Software
DevOps Chicago
 
PDF
Slaying Monoliths with Node and Docker
Yunong Xiao
 
PDF
Evolution of the Netflix API
C4Media
 
PDF
QConSF 2014 - How we learned to stop worrying and start deploying the Netflix...
Sangeeta Narayanan
 
PPTX
Netflix API : BAPI 2011 Presentation : SF
Daniel Jacobson
 
PPTX
Techniques for Scaling the Netflix API - QCon SF
Daniel Jacobson
 
DOCX
How has netflix embraced graph ql for rapid application development
jenniferCarnel1
 
PDF
Triangle Devops Meetup 10/2015
aspyker
 
PPTX
NetflixOSS for Triangle Devops Oct 2013
aspyker
 
Move Fast;Stay Safe:Developing & Deploying the Netflix API
Sangeeta Narayanan
 
The new Netflix API
Katharina Probst
 
Maintaining the Netflix Front Door - Presentation at Intuit Meetup
Daniel Jacobson
 
Maintaining the Front Door to Netflix
Benjamin Schmaus
 
Gluecon 2013 netflix api crash course
Benjamin Schmaus
 
The Netflix API Platform for Server-Side Scripting
Katharina Probst
 
Netflix Cloud Architecture and Open Source
aspyker
 
Netflix Architecture and Open Source
All Things Open
 
Performance and Fault Tolerance for the Netflix API
Ben Christensen
 
Presentation to ESPN about the Netflix API
Daniel Jacobson
 
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Amer Ather
 
20140708 - Jeremy Edberg: How Netflix Delivers Software
DevOps Chicago
 
Slaying Monoliths with Node and Docker
Yunong Xiao
 
Evolution of the Netflix API
C4Media
 
QConSF 2014 - How we learned to stop worrying and start deploying the Netflix...
Sangeeta Narayanan
 
Netflix API : BAPI 2011 Presentation : SF
Daniel Jacobson
 
Techniques for Scaling the Netflix API - QCon SF
Daniel Jacobson
 
How has netflix embraced graph ql for rapid application development
jenniferCarnel1
 
Triangle Devops Meetup 10/2015
aspyker
 
NetflixOSS for Triangle Devops Oct 2013
aspyker
 
Ad

Recently uploaded (20)

PPTX
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
PPTX
internet básico presentacion es una red global
70965857
 
PDF
DevOps Design for different deployment options
henrymails
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PPTX
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
PPTX
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PPTX
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
PPTX
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
PPTX
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
PPTX
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PPT
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
PPTX
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
PDF
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
PDF
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
PDF
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
PPTX
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PDF
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
internet básico presentacion es una red global
70965857
 
DevOps Design for different deployment options
henrymails
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
Ad

The Netflix API for a global service