Class OutlierDetectorConfig
See the Envoy docs for the official OutlierDetector configuration definition.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder forOutlierDetectorConfig
instances. -
Method Summary
Modifier and TypeMethodDescriptionThe base ejection time.boolean
Determines whether a cancellation is considered to be an error.int
The penalty factory to apply to concurrent requests.int
The number of consecutive failures before the attempt to suspect the host.The amount of jitter to add to the ejection time.int
The probability in percentage that a host will be marked as unhealthy when a host reaches theconsecutive5xx()
threshold.int
The probability in percentage that a host will be marked as unhealthy when a host exceeds the failure percentage outlier detectors threshold.int
The probability in percentage that a host will be marked as unhealthy when a host exceeds the success rate outlier detectors threshold.int
The penalty factor for local cancellation of requests.int
The penalty factor for requests that were classified as an error.The Exponentially Weighted Moving Average (EWMA) half-life.int
The threshold for consecutive connection failures to a host.The interval on which to run failure detectors.The jitter used along with the configured interval to determine duration between outlier detector checks.int
The minimum number of hosts required to perform the failure percentage outlier detector analysis.int
The minimum number of requests in an outlier detector interval required to include it in the failure percentage outlier detector analysis.int
The failure threshold in percentage for ejecting a host.int
The maximum percentage of hosts that can be ejected due to outlier detection.The maximum amount of time a host can be ejected regardless of the number of consecutive ejections.The interval between service discovery resubscribes.The jitter to use along with the service discovery resubscribe interval.int
The minimum number of hosts required to perform the success rate outlier detector analysis.int
The minimum number of requests in an outlier detector interval required to include it in the success rate outlier detector analysis.int
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.toString()
-
Method Details
-
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 int 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.
-
cancellationIsError
public boolean cancellationIsError()Determines whether a cancellation is considered to be an error.- Returns:
- whether a cancellation is considered to be an error.
-
ewmaErrorPenalty
public int 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.
-
concurrentRequestPenalty
public int concurrentRequestPenalty()The penalty factory to apply to concurrent requests.The EWMA penalty to apply to endpoints when there are concurrent requests. By penalizing endpoints with concurrent load the traffic distribution will be smoother for algorithms that consider load metrics.
- Returns:
- the penalty factory to use for concurrent load.
-
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:
-
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
The interval between service discovery resubscribes.- Returns:
- the interval between service discovery resubscribes.
- See Also:
-
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
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
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 theconsecutive5xx()
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
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
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:
-
toString
-