diff --git a/envoy/config/filter/fault/v2/fault.proto b/envoy/config/filter/fault/v2/fault.proto index 7c6e405b..89d1dc2c 100644 --- a/envoy/config/filter/fault/v2/fault.proto +++ b/envoy/config/filter/fault/v2/fault.proto @@ -42,6 +42,25 @@ message FaultDelay { [(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true]; } - // The percentage of operations/connection requests on which the delay will be injected. - envoy.type.FractionalPercent percentage = 4; + // The percentage of operations/connections/requests on which the delay will be injected. + type.FractionalPercent percentage = 4; +} + +// Describes a rate limit to be applied. +message FaultRateLimit { + // Describes a fixed/constant rate limit. + message FixedLimit { + // The limit supplied in KiB/s. + uint64 limit_kbps = 1 [(validate.rules).uint64.gte = 1]; + } + + oneof limit_type { + option (validate.required) = true; + + // A fixed rate limit. + FixedLimit fixed_limit = 1; + } + + // The percentage of operations/connections/requests on which the rate limit will be injected. + type.FractionalPercent percentage = 2; } diff --git a/envoy/config/filter/http/fault/v2/fault.proto b/envoy/config/filter/http/fault/v2/fault.proto index eb763da7..df425896 100644 --- a/envoy/config/filter/http/fault/v2/fault.proto +++ b/envoy/config/filter/http/fault/v2/fault.proto @@ -30,13 +30,13 @@ message FaultAbort { // The percentage of requests/operations/connections that will be aborted with the error code // provided. - envoy.type.FractionalPercent percentage = 3; + type.FractionalPercent percentage = 3; } message HTTPFault { // If specified, the filter will inject delays based on the values in the - // object. At least *abort* or *delay* must be specified. - envoy.config.filter.fault.v2.FaultDelay delay = 1; + // object. + filter.fault.v2.FaultDelay delay = 1; // If specified, the filter will abort requests based on the values in // the object. At least *abort* or *delay* must be specified. @@ -79,4 +79,11 @@ message HTTPFault { // 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; + + // The response rate limit to be applied to the response body of the stream. + // + // .. attention:: + // This is a per-stream limit versus a connection level limit. This means that concurrent streams + // will each get an independent limit. + filter.fault.v2.FaultRateLimit response_rate_limit = 7; }