Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
This changeset attempts to solve several problems:
Custom filter logic
xDS considers all endpoints when computing whether a PrioritySet is in panic state. For instance, if the percentage of unhealthy endpoints exceeds a preconfigured panic threshold, the endpoint selection includes all endpoints regardless of the degraded status. While armeria supports an HealthCheckedEndpointGroup out of the box, it filters out healthy endpoints automatically.
In order to resolve this, I propose that a AbstractHealthCheckedEndpointGroupBuilder#healthCheckedEndpointPredicate API is added
Per-cluster health check configuration
Per-cluster member health check is difficult with the current API since a single parameter set is statically defined for an entire health checked endpoint group.
We already have an abstraction AbstractHealthCheckedEndpointGroupBuilder#newCheckerFactory. I propose that this API be used for the purpose of xDS. In order to support the parameters xDS allows configuring, I propose that parameters are passed to HttpHealthChecker via the constructor instead of the HealthCheckerContext. In order to support this change, HttpHealthChecker has been moved to an internal package so the xds module can also access it.
Modifications:
Added APIs AbstractHealthCheckedEndpointGroupBuilder#healthCheckedEndpointPredicate and modified HealthCheckedEndpointGroup to filter endpoints based on the predicate.
Health checked Endpoints now have attributes HEALTHY and DEGRADED set.
HealthCheckedEndpointGroup#setEndpoints is now called on every invocation of updateHealth, not just when a health status changes.
xDS sometimes needs to override the health checked Endpoint, so modified to receive health checked parameters from the HttpHealthChecker constructor instead of HealthCheckerContext.
In the process, HttpHealthChecker has been moved to an internal package
HealthCheckerContext#originalEndpoint has been added to retrieve the original endpoint. The other APIs haven't been deprecated since it is potentially useful information that other HealthCheckers may be using.
Introduced a XdsHealthCheckedEndpointGroupBuilder which implements its own checkerFactory.
EndpointUtil#coarseHealth has been updated to consider HEALTHY, DEGRADED attributes when determining health.
Result:
The behavior of XdsEndpointGroup is more aligned with envoy in terms of health checking
Motivation:
It is recommended to review https://github.com/line/armeria/pull/5802 prior to this PR
This changeset attempts to solve several problems:
Custom filter logic
xDS considers all endpoints when computing whether a
PrioritySet
is in panic state. For instance, if the percentage of unhealthy endpoints exceeds a preconfigured panic threshold, the endpoint selection includes all endpoints regardless of the degraded status. While armeria supports anHealthCheckedEndpointGroup
out of the box, it filters out healthy endpoints automatically.In order to resolve this, I propose that a
AbstractHealthCheckedEndpointGroupBuilder#healthCheckedEndpointPredicate
API is addedPer-cluster health check configuration
Per-cluster member health check is difficult with the current API since a single parameter set is statically defined for an entire health checked endpoint group.
We already have an abstraction
AbstractHealthCheckedEndpointGroupBuilder#newCheckerFactory
. I propose that this API be used for the purpose of xDS. In order to support the parameters xDS allows configuring, I propose that parameters are passed toHttpHealthChecker
via the constructor instead of theHealthCheckerContext
. In order to support this change,HttpHealthChecker
has been moved to an internal package so thexds
module can also access it.Modifications:
AbstractHealthCheckedEndpointGroupBuilder#healthCheckedEndpointPredicate
and modifiedHealthCheckedEndpointGroup
to filter endpoints based on the predicate.Endpoint
s now have attributesHEALTHY
andDEGRADED
set.HealthCheckedEndpointGroup#setEndpoints
is now called on every invocation ofupdateHealth
, not just when a health status changes.Endpoint
, so modified to receive health checked parameters from theHttpHealthChecker
constructor instead ofHealthCheckerContext
.HttpHealthChecker
has been moved to an internal packageHealthCheckerContext#originalEndpoint
has been added to retrieve the original endpoint. The other APIs haven't been deprecated since it is potentially useful information that otherHealthChecker
s may be using.XdsHealthCheckedEndpointGroupBuilder
which implements its owncheckerFactory
.EndpointUtil#coarseHealth
has been updated to considerHEALTHY
,DEGRADED
attributes when determining health.Result:
XdsEndpointGroup
is more aligned with envoy in terms of health checking