Skip to content

Update max_stream_duration dynamically #14260

Closed

Description

@Chuongv

Allow ability to update max_stream_duration dynamically

Description

We want to do some work at the start of the decodeHeaders of our downstream request and not count it against our max_stream_duration. We can dynamically update the request timeout by setting x-envoy-upstream-rq-timeout-ms in our decodeHeaders to account for this. However the timer is stopped after the request decoder filter ends or the response has started.

Given a response could send the headers (disarming the timer) and be streaming the body, we have no way to enforce this other than using max_stream_duration.

The HTTP protocol max_stream_duration is defined in a generic message used by the HTTP connection manager. The max stream duration is the maximum time that a stream’s lifetime will span. You can use this functionality when you want to reset HTTP request/response streams periodically. You can’t use request_timeout in this situation because this timer will be disarmed if a response header is received on the request/response streams. This timeout is available on both upstream and downstream connections.

From Envoy Docs

Solution

Allow updating the max_stream_duration

Envoy protocol options

Activity

  1. added
    enhancement
    triage
    on Dec 3, 2020
  2. added and removed
    enhancement
    triage
    on Dec 7, 2020
  3. mattklein123 commented on Dec 7, 2020

    @mattklein123
    Member

    Seems reasonable to allow this to be modified by a filter somehow. Feel free to propose something concrete!

  4. github-actions commented on Jan 6, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  5. added
    stale
    on Jan 6, 2021
  6. github-actions commented on Jan 13, 2021

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

  7. Shikugawa commented on Mar 9, 2021

    @Shikugawa
    Member

    @mattklein123 This feature can be required in a special situation. Could we reopen this?

  8. added
    help wanted
    and removed
    stale
    on Mar 9, 2021
  9. self-assigned this
    on Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions