1syntax = "proto3"; 2 3package envoy.api.v2.cluster; 4 5import "google/protobuf/duration.proto"; 6import "google/protobuf/wrappers.proto"; 7 8import "udpa/annotations/migrate.proto"; 9import "udpa/annotations/status.proto"; 10import "validate/validate.proto"; 11 12option java_package = "io.envoyproxy.envoy.api.v2.cluster"; 13option java_outer_classname = "OutlierDetectionProto"; 14option java_multiple_files = true; 15option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; 16option csharp_namespace = "Envoy.Api.V2.ClusterNS"; 17option ruby_package = "Envoy::Api::V2::ClusterNS"; 18option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; 19option (udpa.annotations.file_status).package_version_status = FROZEN; 20 21// [#protodoc-title: Outlier detection] 22 23// See the :ref:`architecture overview <arch_overview_outlier_detection>` for 24// more information on outlier detection. 25// [#next-free-field: 21] 26message OutlierDetection { 27 // The number of consecutive server-side error responses (for HTTP traffic, 28 // 5xx responses; for TCP traffic, connection failures; for Redis, failure to 29 // respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. 30 google.protobuf.UInt32Value consecutive_5xx = 1; 31 32 // The time interval between ejection analysis sweeps. This can result in 33 // both new ejections as well as hosts being returned to service. Defaults 34 // to 10000ms or 10s. 35 google.protobuf.Duration interval = 2 [(validate.rules).duration = {gt {}}]; 36 37 // The base time that a host is ejected for. The real time is equal to the 38 // base time multiplied by the number of times the host has been ejected. 39 // Defaults to 30000ms or 30s. 40 google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration = {gt {}}]; 41 42 // The maximum % of an upstream cluster that can be ejected due to outlier 43 // detection. Defaults to 10% but will eject at least one host regardless of the value. 44 google.protobuf.UInt32Value max_ejection_percent = 4 [(validate.rules).uint32 = {lte: 100}]; 45 46 // The % chance that a host will be actually ejected when an outlier status 47 // is detected through consecutive 5xx. This setting can be used to disable 48 // ejection or to ramp it up slowly. Defaults to 100. 49 google.protobuf.UInt32Value enforcing_consecutive_5xx = 5 [(validate.rules).uint32 = {lte: 100}]; 50 51 // The % chance that a host will be actually ejected when an outlier status 52 // is detected through success rate statistics. This setting can be used to 53 // disable ejection or to ramp it up slowly. Defaults to 100. 54 google.protobuf.UInt32Value enforcing_success_rate = 6 [(validate.rules).uint32 = {lte: 100}]; 55 56 // The number of hosts in a cluster that must have enough request volume to 57 // detect success rate outliers. If the number of hosts is less than this 58 // setting, outlier detection via success rate statistics is not performed 59 // for any host in the cluster. Defaults to 5. 60 google.protobuf.UInt32Value success_rate_minimum_hosts = 7; 61 62 // The minimum number of total requests that must be collected in one 63 // interval (as defined by the interval duration above) to include this host 64 // in success rate based outlier detection. If the volume is lower than this 65 // setting, outlier detection via success rate statistics is not performed 66 // for that host. Defaults to 100. 67 google.protobuf.UInt32Value success_rate_request_volume = 8; 68 69 // This factor is used to determine the ejection threshold for success rate 70 // outlier ejection. The ejection threshold is the difference between the 71 // mean success rate, and the product of this factor and the standard 72 // deviation of the mean success rate: mean - (stdev * 73 // success_rate_stdev_factor). This factor is divided by a thousand to get a 74 // double. That is, if the desired factor is 1.9, the runtime value should 75 // be 1900. Defaults to 1900. 76 google.protobuf.UInt32Value success_rate_stdev_factor = 9; 77 78 // The number of consecutive gateway failures (502, 503, 504 status codes) 79 // before a consecutive gateway failure ejection occurs. Defaults to 5. 80 google.protobuf.UInt32Value consecutive_gateway_failure = 10; 81 82 // The % chance that a host will be actually ejected when an outlier status 83 // is detected through consecutive gateway failures. This setting can be 84 // used to disable ejection or to ramp it up slowly. Defaults to 0. 85 google.protobuf.UInt32Value enforcing_consecutive_gateway_failure = 11 86 [(validate.rules).uint32 = {lte: 100}]; 87 88 // Determines whether to distinguish local origin failures from external errors. If set to true 89 // the following configuration parameters are taken into account: 90 // :ref:`consecutive_local_origin_failure<envoy_api_field_cluster.OutlierDetection.consecutive_local_origin_failure>`, 91 // :ref:`enforcing_consecutive_local_origin_failure<envoy_api_field_cluster.OutlierDetection.enforcing_consecutive_local_origin_failure>` 92 // and 93 // :ref:`enforcing_local_origin_success_rate<envoy_api_field_cluster.OutlierDetection.enforcing_local_origin_success_rate>`. 94 // Defaults to false. 95 bool split_external_local_origin_errors = 12; 96 97 // The number of consecutive locally originated failures before ejection 98 // occurs. Defaults to 5. Parameter takes effect only when 99 // :ref:`split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>` 100 // is set to true. 101 google.protobuf.UInt32Value consecutive_local_origin_failure = 13; 102 103 // The % chance that a host will be actually ejected when an outlier status 104 // is detected through consecutive locally originated failures. This setting can be 105 // used to disable ejection or to ramp it up slowly. Defaults to 100. 106 // Parameter takes effect only when 107 // :ref:`split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>` 108 // is set to true. 109 google.protobuf.UInt32Value enforcing_consecutive_local_origin_failure = 14 110 [(validate.rules).uint32 = {lte: 100}]; 111 112 // The % chance that a host will be actually ejected when an outlier status 113 // is detected through success rate statistics for locally originated errors. 114 // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. 115 // Parameter takes effect only when 116 // :ref:`split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>` 117 // is set to true. 118 google.protobuf.UInt32Value enforcing_local_origin_success_rate = 15 119 [(validate.rules).uint32 = {lte: 100}]; 120 121 // The failure percentage to use when determining failure percentage-based outlier detection. If 122 // the failure percentage of a given host is greater than or equal to this value, it will be 123 // ejected. Defaults to 85. 124 google.protobuf.UInt32Value failure_percentage_threshold = 16 125 [(validate.rules).uint32 = {lte: 100}]; 126 127 // The % chance that a host will be actually ejected when an outlier status is detected through 128 // failure percentage statistics. This setting can be used to disable ejection or to ramp it up 129 // slowly. Defaults to 0. 130 // 131 // [#next-major-version: setting this without setting failure_percentage_threshold should be 132 // invalid in v4.] 133 google.protobuf.UInt32Value enforcing_failure_percentage = 17 134 [(validate.rules).uint32 = {lte: 100}]; 135 136 // The % chance that a host will be actually ejected when an outlier status is detected through 137 // local-origin failure percentage statistics. This setting can be used to disable ejection or to 138 // ramp it up slowly. Defaults to 0. 139 google.protobuf.UInt32Value enforcing_failure_percentage_local_origin = 18 140 [(validate.rules).uint32 = {lte: 100}]; 141 142 // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. 143 // If the total number of hosts in the cluster is less than this value, failure percentage-based 144 // ejection will not be performed. Defaults to 5. 145 google.protobuf.UInt32Value failure_percentage_minimum_hosts = 19; 146 147 // The minimum number of total requests that must be collected in one interval (as defined by the 148 // interval duration above) to perform failure percentage-based ejection for this host. If the 149 // volume is lower than this setting, failure percentage-based ejection will not be performed for 150 // this host. Defaults to 50. 151 google.protobuf.UInt32Value failure_percentage_request_volume = 20; 152} 153