-
Notifications
You must be signed in to change notification settings - Fork 16
Feature: gateway timeouts #78
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
Feature: gateway timeouts #78
Conversation
Signed-off-by: Nick Beenham <[email protected]>
Signed-off-by: Nick Beenham <[email protected]>
**idle:** The amount of time the gateway should wait for a response from the application before timing out when the connection is idle. | ||
**idleConnection:** The amount of time the gateway should wait for a response from the application before timing out when the connection is idle. | ||
|
||
This maps to the contour timeoutPolicy - https://github.com/projectcontour/contour/blob/main/apis/projectcontour/v1/httpproxy.go#L1126 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to consider how this design will evolve if we support other ingress controllers options in future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 as removing Contour as a hard dependency is on the roadmap: radius-project/roadmap#58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need refactoring, will check with k8s gateway API for similarities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I looked into this and adapted to follow the k8s gateway api spec
The solution would update the specification for the gateway resource in the bicep file to include a timeoutPolicy object. This object would contain the following properties: | ||
**response:** The amount of time the gateway should wait for a response from the application before timing out. | ||
**idle:** The amount of time the gateway should wait for a response from the application before timing out when the connection is idle. | ||
**idleConnection:** The amount of time the gateway should wait for a response from the application before timing out when the connection is idle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idle and idleConnection seem to have same meaning, should we clarify it better when we write the user docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update
Any thoughts on the future maintenance of the spec with the possible gateway implementation changes? The suggested contract change is tied to Contour specific implementation of the gateway. If there is a plan to switch from Contour specific API to more generic GatewayAPI, then the suggested contact will be hard to migrate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 This is good - agree with checking on the K8s gateway api, as well.
Adding a new comment for timeouts comparison with the gateway api specification. Route Timeouts have 2 optional fields:
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. and BackendRequest specifies a timeout for an individual request from the gateway 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. Is the consensus to update to match the gateway specification? |
This pull request is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Can I get a review please @kachawla , @zachcasper @sylvainsf |
Signed-off-by: Nick Beenham <[email protected]>
Signed-off-by: Nick Beenham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great doc!
Signed-off-by: Nick Beenham <[email protected]>
@willtsai is anything else needed here to approve and merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this scenario deployment to Kubernetes is handled by Application RP instead of DE.
Thanks for the updates @superbeeny. Did you also get a chance to look into #78 (comment)? |
Just saw your comment above on this #78 (comment). It makes sense to me, thanks for looking into this. Some of the places in the doc need to be updated to reflect this. |
Left another comment on #78 |
Thanks @superbeeny! Let me know when the PR is ready for re-review. This is close to approval :) |
@kachawla I think this is ready now, let's have a run through it if not |
@superbeeny, doesn't look like your updates are reflected in the PR. Could you please look into the comments above from 2 weeks ago? |
Signed-off-by: Nick Beenham <[email protected]>
addressed comments and ready for review |
Signed-off-by: Karishma Chawla <[email protected]>
New design note for gateway timeouts