-
Notifications
You must be signed in to change notification settings - Fork 544
HTTPRoute timeout #2013
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
HTTPRoute timeout #2013
Changes from all commits
e32217e
6281ef1
d8f2b2b
e56b07b
e148233
a9bd3a9
482ce15
df71817
d8d7472
e40ed42
acadd11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,6 +263,57 @@ type HTTPRouteRule struct { | |
// +optional | ||
// +kubebuilder:validation:MaxItems=16 | ||
BackendRefs []HTTPBackendRef `json:"backendRefs,omitempty"` | ||
|
||
// Timeouts defines the timeouts that can be configured for an HTTP request. | ||
// | ||
// Support: Extended | ||
// | ||
// +optional | ||
// <gateway:experimental> | ||
Timeouts *HTTPRouteTimeouts `json:"timeouts,omitempty"` | ||
SRodi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute. | ||
// Timeout values are represented with Gateway API Duration formatting. | ||
// Specifying a zero value such as "0s" is interpreted as no timeout. | ||
// | ||
// +kubebuilder:validation:XValidation:message="backendRequest timeout cannot be longer than request timeout",rule="!(has(self.request) && has(self.backendRequest) && duration(self.request) != duration('0s') && duration(self.backendRequest) > duration(self.request))" | ||
type HTTPRouteTimeouts struct { | ||
SRodi marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we also need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's leave it out. We're moving away from v1alpha2 types (they're no longer served in v0.8.0 CRDs) and I'd expect most/all implementations to have moved away from them before we hit v1.0.0. I haven't had time to figure out if we should leave v1alpha2 type definitions in place for one more release or drop them in v1.0, but in either case, I think I'd rather avoid adding anything new to them. |
||
// Request specifies the maximum duration for a gateway to respond to an HTTP request. | ||
// If the gateway has not been able to respond before this deadline is met, the gateway | ||
// MUST return a timeout error. | ||
// | ||
// For example, setting the `rules.timeouts.request` field to the value `10s` in an | ||
// `HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds | ||
// to complete. | ||
SRodi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// | ||
// This timeout is intended to cover as close to the whole request-response transaction | ||
// as possible although an implementation MAY choose to start the timeout after the entire | ||
// request stream has been received instead of immediately after the transaction is | ||
// initiated by the client. | ||
// | ||
// When this field is unspecified, request timeout behavior is implementation-specific. | ||
// | ||
// Support: Extended | ||
// | ||
// +optional | ||
Request *Duration `json:"request,omitempty"` | ||
|
||
// BackendRequest specifies a timeout for an individual request from the gateway | ||
SRodi marked this conversation as resolved.
Show resolved
Hide resolved
robscott marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// to a backend. This covers the time from when the request first starts being | ||
// sent from the gateway to when the full response has been received from the backend. | ||
SRodi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// | ||
// An entire client HTTP transaction with a gateway, covered by the Request timeout, | ||
// may result in more than one call from the gateway to the destination backend, | ||
// for example, if automatic retries are supported. | ||
// | ||
// Because the Request timeout encompasses the BackendRequest timeout, the value of | ||
// BackendRequest must be <= the value of Request timeout. | ||
// | ||
// Support: Extended | ||
// | ||
// +optional | ||
BackendRequest *Duration `json:"backendRequest,omitempty"` | ||
} | ||
|
||
// PathMatchType specifies the semantics of how HTTP paths should be compared. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.