Class ReactiveHealthHandler
java.lang.Object
org.keycloak.quarkus.runtime.integration.health.ReactiveHealthHandler
- All Implemented Interfaces:
io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
- Direct Known Subclasses:
ReactiveLivenessHandler
public abstract class ReactiveHealthHandler
extends Object
implements io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
This adds the possibility to have a non-blocking health handler in Quarkus.
Without a non-blocking health check, all liveness and readiness probes will enqueue in the worker thread pool. Under high load of if there is a lot of blocking IO happening (for example, during Keycloak cluster rebalancing), this leads to probes being queued. Queued probes would lead to timeouts unless the timeouts are configured to 10-20 seconds. Reactive probes avoid the enqueueing in the worker thread pool for all non-blocking probes, which will be the default for the (otherwise empty) liveness probe. For the readiness probe, this depends on the implementation of the specific readiness probes.
This is a workaround until quarkusio/quarkus#35100 is available in a regular Quarkus version. Then these classes can be removed.
- Author:
- Alexander Schwartz
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReactiveHealthHandler
public ReactiveHealthHandler()
-
-
Method Details
-
handle
public void handle(io.vertx.ext.web.RoutingContext context) - Specified by:
handlein interfaceio.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
-
getHealth
protected abstract io.smallrye.mutiny.Uni<io.smallrye.health.SmallRyeHealth> getHealth()
-