-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Enable graceful shutdown by default #37495
Comments
We discussed this today as a team and we'd prefer that graceful shutdown remains an opt-in feature. We discussed enabling it by default automatically on Kubernetes, but we'd rather keep things aligned so that there are no surprises when deploying an app. |
Most (if not all) container and process monitoring solutions have timeouts in place to kill their monitored subprocess if it takes too long to gracefully exit. Spring itself has a timeout defaulting to just 30 seconds (in case there even are requests that last this long to start with). Other enterprise-grade web frameworks such as ASP.NET Core have a 30 second graceful shutdown by default: https://github.com/dotnet/dotnet-docker/blob/main/samples/kubernetes/graceful-shutdown/graceful-shutdown.md I understand the concerns, but I urge the team to re-think this as a step toward the future by making the applications built with Spring Boot more ergonomic by default. Can't this be re-evaluated to be scheduled as a breaking change in the next Spring Boot major version, similar to spring-projects/spring-framework#28552? |
Thanks for raising this @henry701. Given the feature has been there for a while, seems stable, and is able to be toggled easily, we're going to try to change the default for our next milestone. |
When running in Kubernetes if an application is requested to shutdown, it makes sense to want to handle in-flight connections gracefully during shutdown.
Now that the graceful flag has existed in spring boot for a while can we make it the default?
The text was updated successfully, but these errors were encountered: