router: support offseting downstream provided grpc timeout (#6628)

This adds support for modifying the grpc-timeout provided by the
downstream by some offset. This is useful to make sure that Envoy is
able to see timeouts before the gRPC client does, as the client will
cancel the request when the deadline has been exceeded which hides the
timeout from the outlier detector.

Signed-off-by: Snow Pettersen <snowp@squareup.com>

Mirrored from https://github.com/envoyproxy/envoy @ 03ae1ef6b9afcfda9545b3d734b54027776254f9
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 758fe69d11
commit 0cb4a00079
  1. 9
      envoy/api/v2/route/route.proto

@ -765,6 +765,15 @@ message RouteAction {
// time gaps between gRPC request and response in gRPC streaming mode.
google.protobuf.Duration max_grpc_timeout = 23 [(gogoproto.stdduration) = true];
// If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting
// the provided duration from the header. This is useful in allowing Envoy to set its global
// timeout to be less than that of the deadline imposed by the calling client, which makes it more
// likely that Envoy will handle the timeout instead of having the call canceled by the client.
// The offset will only be applied if the provided grpc_timeout is greater than the offset. This
// ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
// infinity).
google.protobuf.Duration grpc_timeout_offset = 28 [(gogoproto.stdduration) = true];
// Allows enabling and disabling upgrades on a per-route basis.
// This overrides any enabled/disabled upgrade filter chain specified in the
// HttpConnectionManager

Loading…
Cancel
Save