At Netflix, we provide an API that supports the content discovery, sign-up, and playback experience on thousands of device types that millions use around the world every day. As our user base and traffic has grown by leaps and bounds, we are continuously evolving this API to be flexible, scalable, and resilient and enable the best experience for our users. In this talk, I gave an overview of how and why the Netflix API has evolved to where it is today and how we make it resilient against failures while keeping it flexible and nimble enough to support continuous A/B testing.
4. Is it significant?
❏ Peak
downstream
traffic in the
US is almost
35%.
❏ Almost 70 Million subscribers worldwide and
growing
Source: http://www.sandvine.com/news/global_broadband_trends.asp
24. ❏ UI (script) changes can happen
independently
❏ Script changes can be pushed to running
servers, so decoupled from API push
schedule
❏ Server+UI changes usually involve API team
Impact on velocity and collaboration
29. Hystrix Primer
❏ Protection from and control over
latency and failure from dependencies
❏ Stop cascading failures in a complex
distributed system
❏ Fail fast and rapidly recover
❏ Fall back and gracefully degrade
55. Looking ahead
❏ Breaking up the monolith
❏ Script isolation
❏ Thin client libraries
❏ New interaction models
56. ● > 900 active
endpoints
● ~ 30 client libraries
● 78 thread pools
● high memory usage
Breaking up the
monolith
57. Script isolation & node
❏ Groovy scripts run as
part of API process
❏ UI teams would like to
use other languages
(in particular node.js) API remote
service layer
Service client
libraries
UI/device
scripts (node)
Falcor
var response = model.get("todos[0..2]
['name','done']");
58. Thin client libraries
❏ Many client libraries
contain a lot of
business logic and
have a lot of
dependencies
❏ Move business logic
and dependencies to
server
API remote
service layer
Service client
libraries
UI/device
scripts (node)
Falcor
59. Looking ahead
❏ Breaking up the monolith
❏ Script isolation
❏ Thin client libraries
❏ New interaction models
60. New interaction models
❏ request/response
❏ request/stream
❏ fire-and-forget
❏ event subscription
❏ channel
API remote
service layer
Service client
libraries
UI/device
scripts (node)
Falcor
http://reactivesocket.io