Redesigning the Netflix API

Netflix Technology Blog
5 min readintermediate
--
View Original

Overview

The article discusses the redesign of the Netflix API, which was initially launched in 2008 to support public developers. It highlights the API's growth, the need for redesign due to changing goals and usage patterns, and focuses on reducing API requests and payload sizes to improve efficiency.

What You'll Learn

1

How to reduce API calls to improve performance

2

Why redesigning an API is crucial for scalability

3

How to conceptualize an API as a database for flexibility

Key Questions Answered

What are the main reasons for redesigning the Netflix API?
The redesign is necessary due to the API's critical role in Netflix's operations, the shift from DVD delivery to streaming, and the need to accommodate a growing number of devices and users. The API has grown significantly, necessitating a more efficient design to handle increased requests and payload sizes.
How does the current API design lead to inefficiencies?
The current API design is inefficient because it requires multiple calls to retrieve similar resources, resulting in high chattiness. One device accounts for about 50% of total API calls, which could potentially be reduced through a redesign that consolidates requests and decreases the number of calls needed.
What strategies are being considered to improve the API's performance?
Strategies include reducing the total number of requests by optimizing resource modeling and increasing the payload size of each request. The goal is to deliver a similar user experience with fewer calls, akin to how databases handle variability through SQL.

Key Statistics & Figures

API growth
37×
The API grew by this factor over a 13-month period, indicating its increasing importance within Netflix.
Total API requests handled in January 2011
20+ billion
This figure highlights the scale of API usage and the potential for optimization through redesign.

Key Actionable Insights

1
Consider consolidating API resources to reduce the number of calls made by devices.
By analyzing the current API usage, Netflix found that one device was responsible for a significant portion of API calls. Reducing the number of resources could streamline interactions and improve performance.
2
Evaluate the payload size of API responses to balance performance and data delivery.
As the API redesign progresses, understanding the trade-off between payload size and the number of requests will be crucial for maintaining a responsive user experience while optimizing server load.
3
Adopt a database-like approach for the API to enhance query flexibility.
By conceptualizing the API similarly to a database, Netflix aims to provide more dynamic responses to user requests, which can lead to a more efficient and user-friendly interface.

Common Pitfalls

1
Failing to recognize the need for API redesign can lead to performance bottlenecks.
As usage patterns change and the number of devices increases, an outdated API design may struggle to meet user demands, resulting in slow response times and a poor user experience.