circuit_breaker.proto 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. syntax = "proto3";
  2. package envoy.config.cluster.v3;
  3. import "envoy/config/core/v3/base.proto";
  4. import "envoy/type/v3/percent.proto";
  5. import "google/protobuf/wrappers.proto";
  6. import "udpa/annotations/status.proto";
  7. import "udpa/annotations/versioning.proto";
  8. import "validate/validate.proto";
  9. option java_package = "io.envoyproxy.envoy.config.cluster.v3";
  10. option java_outer_classname = "CircuitBreakerProto";
  11. option java_multiple_files = true;
  12. option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3";
  13. option (udpa.annotations.file_status).package_version_status = ACTIVE;
  14. // [#protodoc-title: Circuit breakers]
  15. // :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
  16. // specified individually for each defined priority.
  17. message CircuitBreakers {
  18. option (udpa.annotations.versioning).previous_message_type =
  19. "envoy.api.v2.cluster.CircuitBreakers";
  20. // A Thresholds defines CircuitBreaker settings for a
  21. // :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`.
  22. // [#next-free-field: 9]
  23. message Thresholds {
  24. option (udpa.annotations.versioning).previous_message_type =
  25. "envoy.api.v2.cluster.CircuitBreakers.Thresholds";
  26. message RetryBudget {
  27. option (udpa.annotations.versioning).previous_message_type =
  28. "envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget";
  29. // Specifies the limit on concurrent retries as a percentage of the sum of active requests and
  30. // active pending requests. For example, if there are 100 active requests and the
  31. // budget_percent is set to 25, there may be 25 active retries.
  32. //
  33. // This parameter is optional. Defaults to 20%.
  34. type.v3.Percent budget_percent = 1;
  35. // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
  36. // number of active retries may never go below this number.
  37. //
  38. // This parameter is optional. Defaults to 3.
  39. google.protobuf.UInt32Value min_retry_concurrency = 2;
  40. }
  41. // The :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`
  42. // the specified CircuitBreaker settings apply to.
  43. core.v3.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}];
  44. // The maximum number of connections that Envoy will make to the upstream
  45. // cluster. If not specified, the default is 1024.
  46. google.protobuf.UInt32Value max_connections = 2;
  47. // The maximum number of pending requests that Envoy will allow to the
  48. // upstream cluster. If not specified, the default is 1024.
  49. // This limit is applied as a connection limit for non-HTTP traffic.
  50. google.protobuf.UInt32Value max_pending_requests = 3;
  51. // The maximum number of parallel requests that Envoy will make to the
  52. // upstream cluster. If not specified, the default is 1024.
  53. // This limit does not apply to non-HTTP traffic.
  54. google.protobuf.UInt32Value max_requests = 4;
  55. // The maximum number of parallel retries that Envoy will allow to the
  56. // upstream cluster. If not specified, the default is 3.
  57. google.protobuf.UInt32Value max_retries = 5;
  58. // Specifies a limit on concurrent retries in relation to the number of active requests. This
  59. // parameter is optional.
  60. //
  61. // .. note::
  62. //
  63. // If this field is set, the retry budget will override any configured retry circuit
  64. // breaker.
  65. RetryBudget retry_budget = 8;
  66. // If track_remaining is true, then stats will be published that expose
  67. // the number of resources remaining until the circuit breakers open. If
  68. // not specified, the default is false.
  69. //
  70. // .. note::
  71. //
  72. // If a retry budget is used in lieu of the max_retries circuit breaker,
  73. // the remaining retry resources remaining will not be tracked.
  74. bool track_remaining = 6;
  75. // The maximum number of connection pools per cluster that Envoy will concurrently support at
  76. // once. If not specified, the default is unlimited. Set this for clusters which create a
  77. // large number of connection pools. See
  78. // :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
  79. // more details.
  80. google.protobuf.UInt32Value max_connection_pools = 7;
  81. }
  82. // If multiple :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
  83. // are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
  84. // the first one in the list is used. If no Thresholds is defined for a given
  85. // :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`, the default values
  86. // are used.
  87. repeated Thresholds thresholds = 1;
  88. }