-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node/CCQ/Server: Clean restart #3598
Conversation
840e480
to
2334fc1
Compare
2334fc1
to
5934552
Compare
5934552
to
7c93a1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally in favor, just a couple small comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to this
This PR changes the proxy server to handle restarts more cleanly, hopefully without dropping query requests.
It adds two new config parameters (with what should be reasonable default values):
shutdownDelay1
andshutdownDelay2
. When a sigterm is received, it will do the following:shutdownDelay1
seconds to allow the load balancer to detect that the server is down and stop routing requests to it.shutdownDelay2
seconds, but checking every second to see if there are no more pending requests.shutdownDelay2
seconds), the server exits.The default values for the two config parameters are based on the default health check parameter values. We may want to tweak those parameters, in which case these parameters can be reduced.
The length of time that Linux will wait between a sigterm and a sigkill is controlled by the
TimeoutStopSec
parameter in the systemd config file. The default is 90s (seconds).In the tilt environment,
shutdownDelay1
is set to zero by default, meaning just shutdown immediately.