Package io.grpc.util

Class OutlierDetectionLoadBalancer

java.lang.Object
io.grpc.LoadBalancer
io.grpc.util.OutlierDetectionLoadBalancer

@Internal public final class OutlierDetectionLoadBalancer extends LoadBalancer
Wraps a child LoadBalancer while monitoring for outlier backends and removing them from the use of the child LB.

This implements the outlier detection gRFC: https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md

The implementation maintains two maps. Each endpoint status is tracked using an EndpointTracker. E.g. for two endpoints with these address list and their tracker: Endpoint e1 : [a1, a2] is tracked with EndpointTracker t1 Endpoint e2 : [a3] is tracked with EndpointTracker t2 The two maps are: First, addressMap maps from socket address -> endpoint tracker : [a1 -> t1, a2 -> t1, a3 -> t2] EndpointTracker has reference to all the subchannels of the corresponding endpoint. Second, trackerMap maps from unordered address set -> endpoint tracker. Updated upon address updates.