Let's Go Further › Graceful shutdown
Previous · Contents · Next
Chapter 11.

Graceful shutdown

In this next section of the book we’re going to talk about an important but often overlooked topic: how to safely stop your running application.

At the moment, when we stop our API application (usually by pressing Ctrl+C) it is terminated immediately with no opportunity for in-flight HTTP requests to complete. This isn’t ideal for two reasons:

We’re going to mitigate these problems by adding graceful shutdown functionality to our application, so that in-flight HTTP requests have the opportunity to complete processing before the application is terminated.

You’ll learn about: