Skip to content

Support setting MaxStreamDuration of both specific routes and globally #6873

Open
@nickburgin

Description

@nickburgin

Envoy has support for setting the MaxStreamDuration both globally and on a route, I suspect configuring this instead of an envoy route timeout would resolve some SSL issues we are seeing when a downstream system has it's request interrupted halfway through a stream entry (when requesting streaming data from one of our streaming endpoints).

Contour currently has no way of passing this configuration through to Envoy.

I have had a preliminary look at the contour code and the changes required to support setting this either globally or per route seem straightforward to me:

Route Specific:

  • Add MaxStreamDuration: envoy.Timeout(r.TimeoutPolicy.MaxStreamDuration) to the RouteAction in routeRoute()
  • Add MaxStreamDuration: string `json:"maxStreamDuration,omitempty"` to the TimeoutPolicy struct
  • Add MaxStreamDuration and error message to timeoutPolicy()

Global Default:

  • Add MaxStreamDuration timeout.Setting to the Timeouts struct
  • Add MaxStreamDuration and an error message to ParseTimeoutPolicy() function
  • Add MaxStreamDuration: *string `json:"maxStreamDuration,omitempty"` to the TimeoutParameters struct

I'm happy to open a PR to implement this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/needs-triageIndicates that an issue needs to be triaged by a project contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions