When video rental and streaming company Netflix released its Netflix API, it was meant to support its DVD-by-mail business. In the time since the Netflix API was released, the business has shifted to streaming instant video, from hundreds of devices. Meanwhile, the Netflix API hasn't changed much and it's time for a redesign, according to Netflix's Daniel Jacobson in his talk at OSCon Wednesday. Jacobson's talk offers examples of how the next iteration might look, including doing away with versions, but creating unique endpoints for each partner's application.
Most REST APIs are designed to support multiple apps with a generic response. Netflix's problem, which has led to its many billions of API requests, is that different devices have different needs. The iPhone may only show a few recommendations, while a TV may have several rows of movie suggestions in multiple categories. Yet, if those two devices are calling the same API, it will take perhaps a dozen requests for the TV just to load the Netflix home screen.
Once that TV or other device using the Netflix API is out in the wild, Netflix needs to support the API for some time, because it can't always force an update of software running on a sprawling number of hardware devices. That makes changing the API very difficult. You'd think the answer would be versioning, but Jacobson thinks the opposite.
Rather than versioning its API, Netflix plans to offer unique endpoints for each device. Each is a sort of abstraction layer that speaks to a central Netflix API. By using different endpoints, Netflix also solves the exploding requests problem. Each of those endpoints can be optimized to only return the data needed by that particular device.
Jacobson explains the approach in his slides embedded below.
It's not an approach that every API can use, though Jacobson said many providers may realize it once their platforms mature. With Netflix focusing on its streaming business, it's clear this strategy is a way to improve user experiences while separating those optimizations from the main API. This pseudo internal use is where Jacobson expects the API landscape to see the most growth.
You can see more of Jacobson's thoughts on APIs in his series of guest posts on ProgrammableWeb from his time at NPR:
- COPE: Create Once, Publish Everywhere
- Content Modularity: More Than Just Data Normalization
- Content Portability: Building an API is Not Enough
- 7 Ways to Make Your API More Successful
- How to Make Money With Your API
- Metrics for Content APIs: An NPR Case Study
We also covered Jacobson's move to Netflix in September.