outlier_detection.proto 8.2 KB

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