Package org.keycloak.health
Interface LoadBalancerCheckProvider
- All Superinterfaces:
Provider
- All Known Implementing Classes:
InfinispanMultiSiteLoadBalancerCheckProvider
This interface is used for controlling load balancer. If one of the implementations reports that it is down,
the load balancer endpoint will return the
DOWN
status.-
Method Summary
Modifier and TypeMethodDescriptionboolean
isDown()
Check if a component represented by this check is down/unhealthy.
-
Method Details
-
isDown
boolean isDown()Check if a component represented by this check is down/unhealthy. The implementation must be non-blocking as it is executed in the event loop. It is necessary to run this in the event loop as blocking requests are queued and then the check would time out on the loadbalancer side when there is an overload situation in Keycloak. An automatic failover to the secondary site due to an overloaded primary site is desired as this could lead to a ping-pong between the sites where the primary site becomes available again once the switchover is complete.- Returns:
- true if the component is down/unhealthy, false otherwise
-