http fault: add response rate limit injection (#6267)

Part of https://github.com/envoyproxy/envoy/issues/5942

Signed-off-by: Matt Klein <mklein@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 628d1668d7dc9244e3a8fa3d3fbabca23e92e23d
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 27ab049ddc
commit 63f54b138b
  1. 23
      envoy/config/filter/fault/v2/fault.proto
  2. 13
      envoy/config/filter/http/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;
}

@ -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;
}

Loading…
Cancel
Save