The Process for Safely Deploying APIs

Design and Build Great Web APIs — by Mike Amundsen (91 / 127)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 The Recommended Pattern for Testing for API C hanges | TOC | Shutting Down an Existing API 👉

When you get to the point where you plan to release your API updates, you have one more opportunity to check for backward-compatibility issues and confirm that you’ve done all you can to eliminate “breakage” for your API consumer clients. That means you need to figure out the best way to deploy your updates into production. To cover all these details, we’ll need to focus on a number of things:

  • Supporting reversibility
  • Using side-by-side deployments
  • Automatically routing traffic vs. waiting for clients
  • Overwriting old API releases

That’s a lot of things to account for, so let’s dig in.

Supporting Reversibility

Ironically, the first thing that you need to do when implementing your API update deployment system is make sure you can quickly and easily take your API out of production. In other words, you need to be able to back out any API update and revert back to the way things were before you attempted the new deployment.

This reversibility is your safety net in case something goes wrong during deployment.

In Chapter 11, Deploying APIs, you learned the value of scripted deployments…

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.