Joey Muia
Joey Muia
Yep, exactly – the pattern is effectively: 1. Receive SIGTERM 2. Continue processing new connections and requests. Only fail (e.g. 503) healthcheck requests. 3. After N seconds, close the listener...
> Hmm, isn't it better to instruct your load balancers to take out the server of the rotation when you want to restart it? This would be a good solution!...
After some thinking, I could see another viable alternative: add a min/max drain time to [`Puma::DSL#drain_on_shutdown`](https://msp-greg.github.io/puma/Puma/DSL.html#drain_on_shutdown-instance_method) (in other words, continue the accept() loop until we've waited the minimum drain time...