Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Spring Boot >= 2.3 #18

Open
dimovelev opened this issue Dec 12, 2020 · 0 comments
Open

Spring Boot >= 2.3 #18

dimovelev opened this issue Dec 12, 2020 · 0 comments

Comments

@dimovelev
Copy link

The idea is still relevant for newer spring boot application. There however you can just switch the readiness like that:
AvailabilityChangeEvent.publish(ctx, ReadinessState.REFUSING_TRAFFIC);. Provided that you use the /actuator/health/readiness for health-checking your application and having the spring graceful shutdown enabled, this would work pretty well. I personally am still using a hook just to let the load-balancers remove me from the pool first, before i start rejecting traffic with 503 (what spring graceful shutdown does out of the box).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant