I had a look at this library from Facebook:
https://github.com/facebookgo/grace
And some others like this one:
https://github.com/fvbock/endless
That let's me do graceful restarts of Go servers so that I have zero downtime and so that I can finish up the ongoing requests preventing data to be corrupted and so on.
But I am wondering how this would work if I had active WebSocket connections while doing this? Would the old server never stop running since there are active WebSocket connections? I don't care too much about the WebSocket connections I only care about the normal requests being served before shutting down the old server and firing up the new updated compiled file that will serve the new logic.
How will this behave with WebSockets?