My initial tests indicate that fabio shuts down immediately when it gets a SIGTERM and doesn't let HTTP requests finish. Infact it returns 502 for any requests that are currently inflight.
I added an upstream that always takes 10 seconds to respond.
I started an HTTP request, and then I stopped the docker container:
Seems like fabio should wait until all connections are completed before shutting down, to prevent 502s. I would expect a timeout of some sort where it waits and then terminates those connections if they are still not complete.
My initial tests indicate that fabio shuts down immediately when it gets a SIGTERM and doesn't let HTTP requests finish. Infact it returns 502 for any requests that are currently inflight.
I added an upstream that always takes 10 seconds to respond.
I started an HTTP request, and then I stopped the docker container:
2020/08/14 18:33:43 [INFO] Caught SIGTERM. Exiting
The HTTP request that had been running for 2-3 seconds at the time, errored immediately after printing the SIGTERM log line with:
Seems like fabio should wait until all connections are completed before shutting down, to prevent 502s. I would expect a timeout of some sort where it waits and then terminates those connections if they are still not complete.