From d8baf27127e0f45984d707754fd90c7464f04eb9 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Fri, 8 Mar 2019 21:17:50 +0000 Subject: [PATCH] http fault: add active fault stat and overflow setting (#6167) 1) Add stat to track number of active injected faults 2) Add config/runtime control over how many concurrent faults can be injected. This is useful in cases where we want to allow 100% fault injection, but want to protect against too many concurrent requests using too many resources. 3) Add stat for faults that overflowed. 4) Misc code cleanup / modernization. Part of https://github.com/envoyproxy/envoy/issues/5942. Signed-off-by: Matt Klein Mirrored from https://github.com/envoyproxy/envoy @ 191c8b02b4908f212f800ed0185f6ee689ba8126 --- envoy/config/filter/http/fault/v2/fault.proto | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/envoy/config/filter/http/fault/v2/fault.proto b/envoy/config/filter/http/fault/v2/fault.proto index aaffbc1f..eb763da7 100644 --- a/envoy/config/filter/http/fault/v2/fault.proto +++ b/envoy/config/filter/http/fault/v2/fault.proto @@ -11,6 +11,8 @@ import "envoy/api/v2/route/route.proto"; import "envoy/config/filter/fault/v2/fault.proto"; import "envoy/type/percent.proto"; +import "google/protobuf/wrappers.proto"; + import "validate/validate.proto"; // [#protodoc-title: Fault Injection] @@ -63,4 +65,18 @@ message HTTPFault { // ` header and compared // against downstream_nodes list. repeated string downstream_nodes = 5; + + // The maximum number of faults that can be active at a single time via the configured fault + // filter. Note that because this setting can be overridden at the route level, it's possible + // for the number of active faults to be greater than this value (if injected via a different + // route). If not specified, defaults to unlimited. This setting can be overridden via + // `runtime ` and any faults that are not injected + // due to overflow will be indicated via the `faults_overflow + // ` stat. + // + // .. attention:: + // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy + // limit. It's possible for the number of active faults to rise slightly above the configured + // amount due to the implementation details. + google.protobuf.UInt32Value max_active_faults = 6; }