The Netflix API<br />How Netflix Launched an API and Evolved it to Serve Millions on Hundreds of Devices<br />By Daniel Ja...
Who Am I?<br />Director of Engineering for Netflix API since October 2010<br />Tenure at NPR from 1999 to 2010<br />Built ...
Netflix Overview<br />Netflix offers subscriptions to unlimited streaming movies and TV shows for a very low price<br />Ab...
What is an API?<br />An API is a “contract” between two computer applications or systems to deliver content or functionali...
How Does the API Fit in at Netflix?<br />
API<br />Personalization Engine<br />User Info<br />Movie Metadata<br />Movie Ratings<br />Similar Movies<br />Reviews<br ...
Original Charter for the Netflix API<br />Expose Netflix metadata and services to the public developer community to “let 1...
Netflix <br />API<br />There are currently over<br />17,000 flowers <br />
Netflix <br />API<br />
Some of the many <br />Netflix-ready <br />devices<br />
Growth of Netflix API<br />
Netflix API Requests by Audience<br />
New Charter for the Netflix API<br />Build and maintain an infinitely horizontally scalable data distribution pipeline for...
Some of the many <br />Netflix-ready <br />devices<br />
Products and Features Vary from Device to Device<br />Application development attempts to treat all apps the same until th...
WebKit vs. Native Apps<br />
Android<br />iPhone<br />
Other Benefits of WebKit:A/B Testing<br />Run multiple test cells at once<br />Tests can be for minor changes or fundament...
What is the future of the API?<br />
Growth of Netflix API<br />
Growth of the Netflix API<br />About 20 Billion requests per month<br />(Peaks at about 18,000 requests per second)<br />
<catalog_titles><br />  <number_of_results>1140</number_of_results><br />  <start_index>0</start_index><br />  <results_pe...
Improve Efficiency of API Requests<br />Could it have been 5 billion requests per month?<br />(Assuming everything else re...
Design for our Key Audiences<br />
Future Architecture needs to support key audience first with a trickle down of features to the public audience<br />Netfli...
Design for The Audience You Want<br />If your current <br />audience is this size<br />Then designyour system for <br />an...
AWS Cloud<br />
Other Considerations for Building APIs<br />Organizational changes<br />Increases in Product Managers<br />Increases in pa...
Presentation to ESPN about the Netflix API
Upcoming SlideShare
Loading in...5
×

Presentation to ESPN about the Netflix API

2,481

Published on

This is a presentation that I gave to ESPN's Digital Media team about the trajectory of the Netflix API. I also discussed Netflix's device implementation strategy and how it enables rapid development and robust A/B testing.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,481
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • RSS feeds are one example of a commonly used API, albeit a very simple one.
  • Podcasts are another example of an API, extended from RSS.
  • In addition to the APIs that ESPN currently offers online, ESPN is also consuming perhaps the most popular API – Google Maps.
  • Netflix has a series of engineering teams that focus on very specific problems around movie and user information. That information needs to get to the hundreds of devices where Netflix users enjoy our streaming service. That information gets through through the API.
  • Visual representation of the “1,000 flowers” model.
  • Some of the apps that have been built by the open developer community (1,000 flowers).
  • Then streaming started taking off for Netflix
  • And the API started supporting more and more internal device implementations
  • Now, we have hundreds of devices being run off the API, driving tremendous business growth.
  • Including the Android app, which just launched in May, 2011.
  • And the Netflix API traffic has gone through the roofAveraging over 20B requests per monthWith peak traffic over 18,000 requests per second
  • And the proportion of API requests coming to the Netflix API through the public has gone way down.The 1,000 flowers represent less than ½ a percent of the total API traffic
  • So, we are now on hundreds of devices. How do we modify our development approach to make it easier to add new devices? How do we improve the efficiency around device implementation to match the efficiencies that the API provide us?
  • Especially when features differ from device to device.
  • The differences across the devices call into question how to develop effectively and efficiently for all of them. This raises a decision on how to implement for the devices. For us, that became a question about WebKit or native app implementations. Most of our implementations are WebKit-based.
  • iPhone and Android apps are both WebKit implementations. In fact, the Netflix Android app is derivative from the same codebase as the iPhone app. There are key differences, but the iPhone codebase can be leveraged here in ways that a native app cannot.
  • So, we have seen tremendous growth in API consumption.
  • Metrics like 20B requests per month sound great, don’t they? The reality is that this number is concerning…
  • In the web world, increasing request numbers mean increasing opportunity of ad impressions, which means increasing opportunity for generating revenue. And when you hit certain thresholds in impressions, CPMs start to rise, which means even more money.
  • Other media organizations are employing different techniques to generate more traffic. The New York Times, for example, is paginating their article pages which creates more potential page views and therefore ad impressions.
  • But for systems that yield output that looks like this, such as APIs, ad impressions are not part of the game. As a result, the increase in requests don’t translate into more revenue. In fact, they translate into more expenses. That is, to handle more requests requires more servers, more systems-admins, a potentially different application architecture, etc.
  • We are challenging ourselves to redesign the API to see if those same 20 billion requests could have been 5 billion or perhaps even less. Through more targeted API designs based on what we have learned through our metrics, we will be able to reduce our API traffic as Netflix’ overall traffic grows.
  • So, when redesigning the API, we want to target it towards to key audiences. For us, the key audiences are our devices.
  • Once it is designed for our future, we will trickle it down to the 1000 flowers and/or other audiences.
  • And we don’t just plan to design the API to be for our current audience. Instead, we plan to dream bigger and design the system for the audience that we want.That doesn’t mean we should implement today the system we want for the dream audience. It just means the design should allow for the system to scale to that audience.
  • For Netflix, we have designed our server architecture, using AWS, to be highly scalable. The API redesign will help us scale the software better to handle this scaling more effectively and efficiently.
  • Transcript of "Presentation to ESPN about the Netflix API"

    1. 1. The Netflix API<br />How Netflix Launched an API and Evolved it to Serve Millions on Hundreds of Devices<br />By Daniel Jacobson<br />
    2. 2. Who Am I?<br />Director of Engineering for Netflix API since October 2010<br />Tenure at NPR from 1999 to 2010<br />Built the custom CMS in 2002<br />Extended system for RSS and Podcasting<br />Launched the NPR API in 2008<br />Launched NPR redesign in 2009<br />
    3. 3. Netflix Overview<br />Netflix offers subscriptions to unlimited streaming movies and TV shows for a very low price<br />About 700 operational employees, 300 engineers<br />More than 23 million subscribers in US and Canada<br />Market capitalization is about $12B<br />Account for over 20% of US bandwidth during peak hours (some say 30%)<br />
    4. 4. What is an API?<br />An API is a “contract” between two computer applications or systems to deliver content or functionality from one to the other.<br />
    5. 5.
    6. 6.
    7. 7.
    8. 8. How Does the API Fit in at Netflix?<br />
    9. 9. API<br />Personalization Engine<br />User Info<br />Movie Metadata<br />Movie Ratings<br />Similar Movies<br />Reviews<br />Etc.<br />
    10. 10. Original Charter for the Netflix API<br />Expose Netflix metadata and services to the public developer community to “let 1,000 flowers bloom.” That community will build rich and exciting new tools and services to improve the value of Netflix to our customers.<br />
    11. 11. Netflix <br />API<br />There are currently over<br />17,000 flowers <br />
    12. 12.
    13. 13.
    14. 14. Netflix <br />API<br />
    15. 15. Some of the many <br />Netflix-ready <br />devices<br />
    16. 16.
    17. 17. Growth of Netflix API<br />
    18. 18. Netflix API Requests by Audience<br />
    19. 19. New Charter for the Netflix API<br />Build and maintain an infinitely horizontally scalable data distribution pipeline for getting metadata and services from internal Netflix systems to streaming client apps on all platforms in the format and/or delivery method that is most optimal for each app and platform.<br />
    20. 20. Some of the many <br />Netflix-ready <br />devices<br />
    21. 21. Products and Features Vary from Device to Device<br />Application development attempts to treat all apps the same until they are different<br />Different devices enable different features, so implementations should consider those differences<br />Aspect Ratios<br />Connection Speeds<br />Security Concerns<br />Screen Real Estate<br />User Expectations<br />
    22. 22. WebKit vs. Native Apps<br />
    23. 23. Android<br />iPhone<br />
    24. 24. Other Benefits of WebKit:A/B Testing<br />Run multiple test cells at once<br />Tests can be for minor changes or fundamentally different designs<br />Winning tests are determined through metrics, not conjecture<br />Winning tests graduate easily to production<br />Pushing tests often do not require partner involvement<br />
    25. 25. What is the future of the API?<br />
    26. 26. Growth of Netflix API<br />
    27. 27. Growth of the Netflix API<br />About 20 Billion requests per month<br />(Peaks at about 18,000 requests per second)<br />
    28. 28.
    29. 29.
    30. 30. <catalog_titles><br /> <number_of_results>1140</number_of_results><br /> <start_index>0</start_index><br /> <results_per_page>10</results_per_page><br /> <catalog_title><br /> <id>http://api.netflix.com/catalog/titles/movies/60021896</id><title short="Star" regular="Star"></title><br /> <box_art small="http://alien2.netflix.com/us/boxshots/tiny/60021896.jpg" <br /> medium="http://alien2.netflix.com/us/boxshots/small/60021896.jpg" <br /> large="http://alien2.netflix.com/us/boxshots/large/60021896.jpg"></box_art><br /> <link href="http://api.netflix.com/catalog/titles/movies/60021896/synopsis" <br />rel="http://schemas.netflix.com/catalog/titles/synopsis" title="synopsis"></link><br /> <release_year>2001</release_year><br /> <category scheme="http://api.netflix.com/catalog/titles/mpaa_ratings" label="NR"></category><br /> <category scheme="http://api.netflix.com/categories/genres" label="Foreign"></category><br /> <link href="http://api.netflix.com/catalog/titles/movies/60021896/cast" <br />rel="http://schemas.netflix.com/catalog/people.cast" title="cast"></link><br /><link href="http://api.netflix.com/catalog/titles/movies/60021896/screen_formats" rel="http://schemas.netflix.com/catalog/titles/screen_formats" title="screen formats"></link<br /> <link href="http://api.netflix.com/catalog/titles/movies/60021896/languages_and_audio" rel="http://schemas.netflix.com/catalog/titles/languages_and_audio" title="languages and audio"></link><br /> <average_rating>1.9</average_rating><br /> <link href="http://api.netflix.com/catalog/titles/movies/60021896/similars" rel="http://schemas.netflix.com/catalog/titles.similars" title="similars"></link><br /> <link href="http://www.netflix.com/Movie/Star/60021896" rel="alternate" title="webpage"></link><br /> </catalog_title><br /> <catalog_title><br /> <id>http://api.netflix.com/catalog/titles/movies/17985448</id><title short="Lone Star" regular="Lone Star"></title><br /> <box_art small="http://alien2.netflix.com/us/boxshots/tiny/17985448.jpg" medium="http://alien2.netflix.com/us/boxshots/small/17985448.jpg" large=""></box_art><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/synopsis" rel="http://schemas.netflix.com/catalog/titles/synopsis" title="synopsis"></link><br /> <release_year>1996</release_year><br /> <category scheme="http://api.netflix.com/catalog/titles/mpaa_ratings" label="R"></category><br /> <category scheme="http://api.netflix.com/categories/genres" label="Drama"></category><br /><link href="http://api.netflix.com/catalog/titles/movies/17985448/awards" rel="http://schemas.netflix.com/catalog/titles/awards" title="awards"></link><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/format_availability" rel="http://schemas.netflix.com/catalog/titles/format_availability" title="formats"></link><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/screen_formats" rel="http://schemas.netflix.com/catalog/titles/screen_formats" title="screen formats"></link><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/languages_and_audio" rel="http://schemas.netflix.com/catalog/titles/languages_and_audio" title="languages and audio"></link><br /> <average_rating>3.7</average_rating><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/previews" rel="http://schemas.netflix.com/catalog/titles/previews" title="previews"></link><br /> <link href="http://api.netflix.com/catalog/titles/movies/17985448/similars" rel="http://schemas.netflix.com/catalog/titles.similars" title="similars"></link><br /> <link href="http://www.netflix.com/Movie/Lone_Star/17985448" rel="alternate" title="webpage"></link><br /> </catalog_title><br /></catalog_titles><br />
    31. 31. Improve Efficiency of API Requests<br />Could it have been 5 billion requests per month?<br />(Assuming everything else remained the same)<br />
    32. 32. Design for our Key Audiences<br />
    33. 33. Future Architecture needs to support key audience first with a trickle down of features to the public audience<br />Netflix <br />API<br />
    34. 34. Design for The Audience You Want<br />If your current <br />audience is this size<br />Then designyour system for <br />an audience that is this size<br />
    35. 35. AWS Cloud<br />
    36. 36. Other Considerations for Building APIs<br />Organizational changes<br />Increases in Product Managers<br />Increases in partner engagements<br />Product specialization<br />Increases in customized user experiences per device<br />Content Portability<br />Changes to the editorial workflow<br />Legal considerations<br />Terms of use<br />Re-negotiation of rights with content providers<br />System scalability<br />Increases in products could increase traffic<br />New devices will modify usage patterns<br />

    ×