Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting MaxStreamDuration of both specific routes and globally #6873

Open
nickburgin opened this issue Jan 22, 2025 · 1 comment
Open
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor.

Comments

@nickburgin
Copy link

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.

@nickburgin nickburgin added kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Jan 22, 2025
Copy link

Hey @nickburgin! Thanks for opening your first issue. We appreciate your contribution and welcome you to our community! We are glad to have you here and to have your input on Contour. You can also join us on our mailing list and in our channel in the Kubernetes Slack Workspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor.
Projects
None yet
Development

No branches or pull requests

1 participant