Evolving an API Design

Let's learn about how we can help our APIs with scaling by carefully evolving our API design.

What is API evolution?

API evolution refers to the process of making changes to an API over time while maintaining compatibility with existing client applications. This involves introducing new features, deprecating old ones, and making other modifications that enhance the functionality of the API, without causing any disruption to its users. The goal of API evolution is to keep the API current and relevant, while ensuring that it remains usable by existing clients.

In this lesson, we’ll take a look at some approaches that may help us evolve our API.

Changing data access patterns

As an API gets popular, the consumers of the API might begin to use it in a way that was not initially anticipated by the designers.

Let's take the example of Twitter. A few years ago, the Twitter application could only receive new tweets in real-time by constantly polling the back-end APIJin, Brenda, Saurabh Sahni, and Amir Shevat. “Chapter 6. Scaling APIs.” In Designing Web APIs: Building APIs That Developers Love. Beijing: O'Reilly, 2018.. This eventually led to the REST APIs getting a huge increase in traffic and caused scalability issues for the rapidly expanding user base.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.