Graceful Shutdown
How to implement a graceful shutdown in Go? You need to start thinking about these kinds of questions when creating a server that needs to maintain a state. For example, if you have a web server running in one AWS EC2 instance and you fix some security issues and want to update the server. If you don’t manage correctly maybe you can lose the data that never was saved in the database or can provoke some bad user experience on every update because lose all connections without any response to the requests because you don’t wait to finish sending the response.
[Read More]