From 0cb4a000795ba6c826888a1bbb8c281d24a72f26 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Sat, 20 Apr 2019 16:15:49 +0000 Subject: [PATCH] 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 Mirrored from https://github.com/envoyproxy/envoy @ 03ae1ef6b9afcfda9545b3d734b54027776254f9 --- envoy/api/v2/route/route.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index 87232a78..10ba8f6b 100644 --- a/envoy/api/v2/route/route.proto +++ b/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