Skip to content

routes timeout is ignored if we set max stream duration #15530

@ramaraochavali

Description

@ramaraochavali

It looks like when we set timeout at route and specify max_stream_duration for grpc_timeout_header_max Envoy is ignoring the timeout value and never timing out the route because max_stream_duration's max_stream_duration is not set for http1 requests. Is this intended behaviour?

Here is the route config

 "route": {
           "cluster": "outbound|80||httpbin.org",
           "timeout": "3s",
           "retry_policy": {
            "retry_on": "connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes",
            "num_retries": 2,
            "retry_host_predicate": [
             {
              "name": "envoy.retry_host_predicates.previous_hosts"
             }
            ],
            "host_selection_retry_max_attempts": "5",
            "retriable_status_codes": [
             503
            ]
           },
           "max_stream_duration": {
            "grpc_timeout_header_max": "3s"
           }
          },
          "metadata": {
           "filter_metadata": {
            "istio": {
             "config": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtual-service/httpbin-ext"
            }
           }
          },
          "decorator": {
           "operation": "httpbin.org:80/*"
          }
         }
        ],
        "include_request_attempt_count": true
       },
       

In this case, we are expecting http1 requests to honour the timeout specified. But the http1 requests never timeout.

Is this intended behaviour? If it is I think it is very confusing and not clear from the documentation that it is how timeouts work with the new fields.

Should n't it honour timeout if MaxStreamDuration's MaxStreamDuration is not set at all?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions