SlideShare a Scribd company logo
Netflix API Crash Course
Building & Running the API in 30 minutes
Ben Schmaus, Netflix
May 2013, Gluecon
bschmaus@netflix.com
@schmaus
Streaming TV Shows & Movies Globally
> 1000 Devices
1/3 of
Internet
at peak
Programmer not Distributor
More than 36 million
subscribers in over
40 countries
How does the API fit
into the picture?
Personalization
Engine
User Info
Movie
Metadata
Ratings
Similar
Movies
Instant
Queue
A/B Test
Engine
API
Personalization
Engine
User Info
Movie
Metadata
Ratings
Similar
Movies
Instant
Queue
A/B Test
Engine
API
Enable UX
Innovation
Insulate from
Failure
> 2 Billion Requests per Day
Growth Over Time
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Automation
Visibility
Operational awareness
Balance speed
& quality
How's the API
put together?
ELB
Routing
Cluster
Mid-tier
Services
Backend
App
Cluster
Backend
App
Cluster
+
API Layer
ELB
Routing
Cluster
Mid-tier
Services
Backend
App
Cluster
Backend
App
Cluster
+
API Layer
Inside an
API
App Server
RxJava
Hystrix
Service Client 1 Service Client 2 Service Client N
HystrixRx+Java
Service
Layer
Service Client
(provided JAR)
Application
Service
/device/endpoint
(provided script)
Service
UI
Teams
Mid-tier
Service
Teams
API
Team
Continually changing UI scripts and
mid-tier services
Functionality, resiliency and
performance drifts over time
Deployment & Ops
REMOVE MANUAL WORK pushing
code to multiple AWS regions/clusters
ENABLE RAPID DEPLOYMENT of
code despite limited visibility into how it's
changed
KEEP TEAM INFORMED about what's
happening in prod
MITIGATE RISK of systemic failure
Tools
End-to-end Traceability Using
Python/Java Glue
Code Flow
Run 1% of your traffic on the new
code and see how it does
API ami-123 API ami-456
2xx
4xx
5xx
latency
busy threads
load
...
Manually looking at graphs and SSH-
ing into servers and grep-ing logs
doesn't scale
(although we used to do that)
Confidence score for each AMI based on
comparison of 1000+ metrics
Scannable visualization of metric space
More
important
Less
important
Cross-reference Jira, Link to code diffs
Track lib changes
Easy to access report artifacts for each AMI
Your basic red/black push
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Gluecon 2013   netflix api crash course
Doing red/black by hand for multiple
clusters across multiple regions is
not fun
Automate multi-cluster/region
pushes
Automate multi-cluster/region
pushes
Don't forget to
automate
rollbacks, too!
$Who, $What, $Where, $When
e.g., "bschmaus, ami-123, Sandbox Canary, 2013-05-06 19:05"
Latest prod change in chat topic
Quickly see status of all clusters in a
region
What the #%*! just happened!?
Historical & realtime metrics, sort
realtime by error/request rate
Distributed grep + tail
2013-05-09.20:38:54 MX 200 us-east-1c i-1824cb73 i-1c61b77f prod
NFPS3-001-8G50FJCX... 288404769389848058 90ms api-global.
netflix.com GET /tvui/release/470/plus/pathEvaluator -
amazon.ami-id: ami-502eb039
amazon.availability-zone: us-east-1c
amazon.instance-id: i-1824cb73
amazon.instance-type: m2.2xlarge
amazon.local-ipv4: 10.6.213.112
amazon.public-hostname: ec2-54-243-4-69.compute-1.amazonaws.
com
amazon.public-ipv4: 54.243.4.69
cookie_esn: NFPS3-001-8G50FJCX...
country: MX
currentTime: 1368131934468
duration-millis: 90
esn: NFPS3-001-8G50FJCX...
geo.city: CIUDADOBREGON
...
$ ./simple_stream.py -f -q 'e["country"]=="MX" && e["esn"]
==~/NFPS3.*/' -r us
Go for haystack handing you
the needle
Or at least be able to make smaller
haystacks
Continuously experiment to make
hard things easier
Even with the best tools, building
software is hard work.
Great engineers build great
software.
Want to help us build the API?
bschmaus@netflix.com
@schmaus

More Related Content

PDF
Autospoting - an automated EC2 spot market bidder
KEY
Cloud Campus(仮称)提案書
PPTX
Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...
PDF
API World 2013 - Transforming the Netflix API
PDF
The Netflix API for a global service
PPTX
Move Fast;Stay Safe:Developing & Deploying the Netflix API
PDF
20140708 - Jeremy Edberg: How Netflix Delivers Software
PPTX
Maintaining the Front Door to Netflix
Autospoting - an automated EC2 spot market bidder
Cloud Campus(仮称)提案書
Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...
API World 2013 - Transforming the Netflix API
The Netflix API for a global service
Move Fast;Stay Safe:Developing & Deploying the Netflix API
20140708 - Jeremy Edberg: How Netflix Delivers Software
Maintaining the Front Door to Netflix

Similar to Gluecon 2013 netflix api crash course (20)

KEY
Real World Cloud Application Security
PPTX
Maintaining the Netflix Front Door - Presentation at Intuit Meetup
PPTX
Netflix Cloud Architecture and Open Source
PDF
Evolving the Netflix API
KEY
Asgard, the Grails App that Deploys Netflix to the Cloud
PDF
Netflix Architecture and Open Source
PPTX
Dystopia as a Service
PPTX
QConSF-MicroServices-IPC-Netflix-Sudhir-2014.pptx
PPTX
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
PDF
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
PDF
Puppet Camp London 2014: Chasing AMI: baking Amazon machine images with Jenki...
PPTX
Maintaining the Front Door to Netflix : The Netflix API
PDF
Microservices for Startups - Donnie Prakoso - AWS - CC18
PPTX
AWS Best Practices
PPT
Fowa Miami 09 Cloud Computing Workshop
PDF
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
PPTX
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
PPTX
Patterns for building resilient and scalable microservices platform on AWS
PDF
Edge architecture ieee international conference on cloud engineering
PDF
The new Netflix API
Real World Cloud Application Security
Maintaining the Netflix Front Door - Presentation at Intuit Meetup
Netflix Cloud Architecture and Open Source
Evolving the Netflix API
Asgard, the Grails App that Deploys Netflix to the Cloud
Netflix Architecture and Open Source
Dystopia as a Service
QConSF-MicroServices-IPC-Netflix-Sudhir-2014.pptx
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Puppet Camp London 2014: Chasing AMI: baking Amazon machine images with Jenki...
Maintaining the Front Door to Netflix : The Netflix API
Microservices for Startups - Donnie Prakoso - AWS - CC18
AWS Best Practices
Fowa Miami 09 Cloud Computing Workshop
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
Patterns for building resilient and scalable microservices platform on AWS
Edge architecture ieee international conference on cloud engineering
The new Netflix API
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
sap open course for s4hana steps from ECC to s4
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MIND Revenue Release Quarter 2 2025 Press Release
Reach Out and Touch Someone: Haptics and Empathic Computing
Ad

Gluecon 2013 netflix api crash course