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 <mklein@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 191c8b02b4908f212f800ed0185f6ee689ba8126
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 5f2f50bfc3
commit d8baf27127
  1. 16
      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 {
// <config_http_conn_man_headers_downstream-service-node>` 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 <config_http_filters_fault_injection_runtime>` and any faults that are not injected
// due to overflow will be indicated via the `faults_overflow
// <config_http_filters_fault_injection_stats>` stat.
//
// .. attention::
// Like other :ref:`circuit breakers <arch_overview_circuit_break>` 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;
}

Loading…
Cancel
Save