The readme has this under the "best practices" section:
It is important that you do not cease to handle new incoming requests immediately after receiving the shutdown signal. This is because there is a high probability of the SIGTERM signal being sent well before the iptables rules are updated on all nodes. The result is that the pod may still receive client requests after it has received the termination signal. If the app stops accepting connections immediately, it causes clients to receive "connection refused" types of errors.
I find this a little disconnected from the rest of the readme: is this at all related to the options you set on the lightship instance, eg shutdownDelay or similar? Should you manually set a timer inside of a registerShutdownHandler before calling .close() on an HTTP server? I think some more context would be very beneficial to users :)
Hi, and thanks for creating this great library!
The readme has this under the "best practices" section:
I find this a little disconnected from the rest of the readme: is this at all related to the options you set on the lightship instance, eg
shutdownDelay
or similar? Should you manually set a timer inside of aregisterShutdownHandler
before calling.close()
on an HTTP server? I think some more context would be very beneficial to users :)