Skip to Content
Designing Web APIs
book

Designing Web APIs

by Brenda Jin, Saurabh Sahni, Amir Shevat
September 2018
Intermediate to advanced
230 pages
5h 11m
English
O'Reilly Media, Inc.
Book available
Content preview from Designing Web APIs

Chapter 6. Scaling APIs

Making sure your API scales both in terms of use cases and load is critical for its success. In this section, we cover the following scaling best practices and tips to help ensure that your API is future-proof:

  • Scaling throughput

  • Evolving API design

  • Paginating APIs

  • Rate-limiting APIs

  • Developer SDKs

When you are building an API that other people depend on, availability and reliability are important. You want to ensure that it never goes down and that it continues to load fast for its users. However, your API can suddenly experience a surge in usage. That can affect the quality of your service or even bring your own application down, if the application relies on your APIs.

To scale your API by supporting an increased number of API calls, there are many things you can do at the application level. Database query optimization, sharding databases, adding missing indexes, utilizing caching, doing expensive operations asynchronously, writing efficient code, and tuning web servers help in increasing the throughput and decreasing the latency. All of these things are very important and you should do them. We cover these topics only briefly in the first section of this chapter, given that they are covered more extensively in other books about web application performance.

Beyond these optimizations, there is another set of changes that are frequently overlooked and can significantly help in scaling APIs. There are ways in which you can develop your API design, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Design of Web APIs

The Design of Web APIs

Arnaud Lauret
API Design Patterns

API Design Patterns

John J. Geewax

Publisher Resources

ISBN: 9781492026914Errata Page