Graceful shutdown in NodeJS
Too Long; Didn't Read
In this article, I am going to show you how to do a graceful shutdown in NodeJS application. We need to handle all requests and close all resources which are processing on data(e.e. database connections) and not take any other requests and after that, you can shut down your server with a quiet conscience. Graceful shutdown means when all your requests to the server is respond and not any data processing work left. You can not know what can happen to the requests that have been made to your server if you shut down the server immediately.