Proto: outlier_detection_policy.proto

Package: resilience.policy.gloo.solo.io

Configure Gloo to remove unhealthy destinations from the connection pool, and add the destinations back when they become healthy again.

Outlier detection is an important part of building resilient apps. An outlier detection policy sets up several conditions, such as retries and ejection percentages, that Gloo Mesh uses to determine if a service is unhealthy. In case an unhealthy service is detected, the outlier detection policy defines how Gloo Mesh removes (ejects) services from the pool of healthy destinations to send traffic to. For VirtualDestinations, traffic is not sent to deployments that are unavailable by default. Your apps then have time to recover before they are added back to the load-balancing pool and checked again for consecutive errors.

Outlier detection policies are applied at the Destination level. For more information, see the outlier detection policy guide.

Example

  apiVersion: resilience.policy.gloo.solo.io/v2
kind: OutlierDetectionPolicy
metadata:
  annotations:
    cluster.solo.io/cluster: ""
  name: outlier-detection
  namespace: bookinfo
spec:
  applyToDestinations:
  - kind: VIRTUAL_DESTINATION
    selector: {}
  config:
    baseEjectionTime: 30s
    consecutiveErrors: 2
    interval: 1s
    maxEjectionPercent: 100
  

OutlierDetectionPolicyReport

FieldDescription
workspaces(repeated OutlierDetectionPolicyReport.WorkspacesEntry)

A list of workspaces in which the policy can apply to workloads.
selectedDestinationPorts(repeated common.gloo.solo.io.DestinationReference)

A list of destination ports selected by the policy.

OutlierDetectionPolicyReport.WorkspacesEntry

FieldDescription
key(string)

value(common.gloo.solo.io.Report)

OutlierDetectionPolicySpec

OutlierDetectionPolicy is used to configure outlier detection on the selected destinations. Specifying this field requires an empty source_selector because it must apply to all traffic. OutlierDetectionPolicies are applied at the Destination level.

For VirtualDestinations, traffic will not be sent to deployments that are unavailable by default. An OutlierDetectionPolicy will add configuration to also eject a deployment that is returning too many 5xx HTTP status codes.

FieldDescription
applyToDestinations(repeated common.gloo.solo.io.DestinationSelector)

Destinations to apply the policy to. If empty, the policy applies to all destinations in the workspace.
config(OutlierDetectionPolicySpec.Config)

The details of the OutlierDetectionPolicy to apply to the selected destinations.

OutlierDetectionPolicySpec.Config

FieldDescription
consecutiveErrors(uint32)

The number of 5xx errors before a destination is removed from the healthy connection pool. The default is 5.
interval(google.protobuf.Duration)

The amount of time between analyzing destinations for ejection. Set this value as an integer plus a unit of time, in the format 1h, 1m, 1s, or 1ms. The value must be at least 1ms, and defaults to 10s. For information about the value format, see the Google protocol buffer documentation.
baseEjectionTime(google.protobuf.Duration)

The minimum time duration for ejection, or the time when a destination is considered unhealthy and not used for load balancing. Set this value as an integer plus a unit of time, in the format 1h, 1m, 1s, or 1ms. The value must be at least 1ms, and defaults to 30s. For information about the value format, see the Google protocol buffer documentation.
maxEjectionPercent(uint32)

The maximum percentage of destinations that can be removed from the healthy connection pool at a time. For example, if you have 10 total destinations that the policy selects, and set this value to 50 percent, 5 destinations can be removed at once. At least 1 destination can always be removed, regardless of the value you set. You can set this value between 0 and 100, with a default of 100.

OutlierDetectionPolicyStatus

The status of the policy after it is applied to your Gloo environment.

FieldDescription
common(common.gloo.solo.io.Status)

The state and workspace conditions of the applied resource.
numSelectedDestinationPorts(uint32)

The number of destination ports selected by the policy.