Class OutlierDetectorConfig

java.lang.Object
io.servicetalk.loadbalancer.OutlierDetectorConfig

public final class OutlierDetectorConfig extends Object
XDS outlier detector configuration.

See the Envoy docs for the official OutlierDetector configuration definition.

  • Method Details

    • ewmaHalfLife

      public Duration ewmaHalfLife()
      The Exponentially Weighted Moving Average (EWMA) half-life. In the context of an exponentially weighted moving average, the half-life means the time during which historical data has the same weight as a new sample.
      Returns:
      the Exponentially Weighted Moving Average (EWMA) half-life.
    • ewmaCancellationPenalty

      public long ewmaCancellationPenalty()
      The penalty factor for local cancellation of requests. The latency of the cancelled request is multiplied by the provided penalty before incorporating it into the EWMA.
      Returns:
      the penalty factor for local cancellation of requests.
    • ewmaErrorPenalty

      public long ewmaErrorPenalty()
      The penalty factor for requests that were classified as an error. The latency of the failed request is multiplied by the provided penalty before incorporating it into the EWMA.
      Returns:
      the penalty factor for requests that were classified as an error.
    • failedConnectionsThreshold

      public int failedConnectionsThreshold()
      The threshold for consecutive connection failures to a host.
      Returns:
      the threshold for consecutive connection failures to a host.
      See Also:
      • OutlierDetectorConfig.Builder.failedConnectionsThreshold(int)
    • failureDetectorIntervalJitter

      public Duration failureDetectorIntervalJitter()
      The jitter used along with the configured interval to determine duration between outlier detector checks.
      Returns:
      the jitter used along with the configured interval to determine duration between outlier detector checks.
      See Also:
    • serviceDiscoveryResubscribeInterval

      public Duration serviceDiscoveryResubscribeInterval()
      The interval between service discovery resubscribes.
      Returns:
      the interval between service discovery resubscribes.
      See Also:
    • serviceDiscoveryResubscribeJitter

      public Duration serviceDiscoveryResubscribeJitter()
      The jitter to use along with the service discovery resubscribe interval.
      Returns:
      the jitter to use along with the service discovery resubscribe interval.
      See Also:
    • consecutive5xx

      public int consecutive5xx()
      The number of consecutive failures before the attempt to suspect the host.
      Returns:
      the number of consecutive failures before the attempt to suspect the host.
    • failureDetectorInterval

      public Duration failureDetectorInterval()
      The interval on which to run failure detectors. Failure percentage and success rate outlier detectors perform periodic scans to detect outliers. Active revival mechanisms such as the layer-4 connectivity detector also use this interval to perform their periodic health check to see if a host can be considered revived.
      Returns:
      the interval on which to run failure percentage and success rate failure detectors.
    • baseEjectionTime

      public Duration baseEjectionTime()
      The base ejection time. The base ejection time is multiplied by the number of consecutive times the host has been ejected to get the total ejection time, capped by the maxEjectionTime().
      Returns:
      the base ejection time.
      See Also:
    • maxEjectionPercentage

      public int maxEjectionPercentage()
      The maximum percentage of hosts that can be ejected due to outlier detection.
      Returns:
      the maximum percentage of hosts that can be ejected due to outlier detection.
    • enforcingConsecutive5xx

      public int enforcingConsecutive5xx()
      The probability in percentage that a host will be marked as unhealthy when a host reaches the consecutive5xx() threshold.
      Returns:
      the probability with which the host should be marked as unhealthy.
    • enforcingSuccessRate

      public int enforcingSuccessRate()
      The probability in percentage that a host will be marked as unhealthy when a host exceeds the success rate outlier detectors threshold.
      Returns:
      the probability with which the host should be marked as unhealthy.
    • successRateMinimumHosts

      public int successRateMinimumHosts()
      The minimum number of hosts required to perform the success rate outlier detector analysis.
      Returns:
      the minimum number of hosts required to perform the success rate outlier detector analysis.
    • successRateRequestVolume

      public int successRateRequestVolume()
      The minimum number of requests in an outlier detector interval required to include it in the success rate outlier detector analysis.
      Returns:
      the minimum number of request required.
    • successRateStdevFactor

      public int successRateStdevFactor()
      The value divided by 1000 and then multiplied against the success rate standard deviation which sets the threshold for ejection in the success rate outlier detector.
      Returns:
      the stdev factor divided by 1000 used to determine the statistical outliers.
    • failurePercentageThreshold

      public int failurePercentageThreshold()
      The failure threshold in percentage for ejecting a host.
      Returns:
      the failure threshold in percentage for ejecting a host.
    • enforcingFailurePercentage

      public int enforcingFailurePercentage()
      The probability in percentage that a host will be marked as unhealthy when a host exceeds the failure percentage outlier detectors threshold.
      Returns:
      the probability with which the host should be marked as unhealthy.
    • failurePercentageMinimumHosts

      public int failurePercentageMinimumHosts()
      The minimum number of hosts required to perform the failure percentage outlier detector analysis.
      Returns:
      the minimum number of hosts required to perform the failure percentage outlier detector analysis.
    • failurePercentageRequestVolume

      public int failurePercentageRequestVolume()
      The minimum number of requests in an outlier detector interval required to include it in the failure percentage outlier detector analysis.
      Returns:
      the minimum number of request required.
    • maxEjectionTime

      public Duration maxEjectionTime()
      The maximum amount of time a host can be ejected regardless of the number of consecutive ejections.
      Returns:
      the maximum amount of time a host can be ejected.
    • ejectionTimeJitter

      public Duration ejectionTimeJitter()
      The amount of jitter to add to the ejection time. An additional amount of 'jitter' is added to the ejection time to prevent connection storms if multiple hosts are ejected at the time.
      Returns:
      the amount of jitter to add to the ejection time.
      See Also: