circuit_breaker.proto 4.2 KB

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