advancedProduction Best Practices

Why does a service need graceful shutdown configured, not just a health check?

Without it, Kubernetes' termination signal during a routine deployment hard-kills in-flight requests instead of letting them finish, producing user-visible errors on every single deployment — `server.shutdown=graceful` stops accepting new requests immediately while letting existing ones complete within a timeout.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why should environment-specific behavior live in profile-specific properties files instead of if-checks in code?← Back to all Spring Boot questions