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 · 3 comments · May be fixed by #6895
Open

Support setting MaxStreamDuration of both specific routes and globally #6873

nickburgin opened this issue Jan 22, 2025 · 3 comments · May be fixed by #6895
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

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

@tsaarni
Copy link
Member

tsaarni commented Jan 25, 2025

Hi @nickburgin,

Looks good to me.

Regarding the global default, in addition to TimeoutParameters defined in ContourConfiguration.spec.envoy.timeouts
the same timeouts can be given in the YAML config file, so it also needs to be added here and convert from YAML config struct to TimeoutParameters here.

nickburgin added a commit to nickburgin/contour that referenced this issue Feb 12, 2025
nickburgin added a commit to nickburgin/contour that referenced this issue Feb 12, 2025
nickburgin added a commit to nickburgin/contour that referenced this issue Feb 12, 2025
Copy link

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the Issue is closed

You can:

  • Mark this Issue as fresh by commenting
  • Close this Issue
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 27, 2025
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants