Support setting MaxStreamDuration of both specific routes and globally #6873
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.
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:
MaxStreamDuration: envoy.Timeout(r.TimeoutPolicy.MaxStreamDuration)
to theRouteAction
inrouteRoute()
MaxStreamDuration: string `json:"maxStreamDuration,omitempty"`
to theTimeoutPolicy
structMaxStreamDuration
and error message totimeoutPolicy()
Global Default:
MaxStreamDuration timeout.Setting
to the Timeouts structMaxStreamDuration
and an error message toParseTimeoutPolicy()
functionMaxStreamDuration: *string `json:"maxStreamDuration,omitempty"`
to theTimeoutParameters
structI'm happy to open a PR to implement this.
The text was updated successfully, but these errors were encountered: