-
Notifications
You must be signed in to change notification settings - Fork 79
Support a separate timeout for listing pending requests #149
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
043a010
Support a custom list-pending-requests timeout
kenfreeman 5479066
Revert "Support a custom list-pending-requests timeout"
kenfreeman a129f4e
Support a custom list-pending-requests timeout
kenfreeman 2dc4b43
Support a custom list-pending-requests timeout
kenfreeman 8bcfe0d
Support a custom list-pending-requests timeout
kenfreeman ca84ddf
Support a custom list-pending-requests timeout
kenfreeman e402686
Support a custom list-pending-requests timeout
kenfreeman da428e5
Support a custom list-pending-requests timeout
kenfreeman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Implementations of the proxy have to coordinate with the existing
proxy-timeout
flag specifically for the purposes of the calls to list pending requests (the proxy has to timeout those calls before the agent times them out or else there is a risk of requests getting dropped).As such, I'd rather that we keep using the
proxy-timeout
flag value for the calls to list pending requests, and make the new flag be used for all the other calls.E.G. the new flag could be something like
proxy-client-timeout
and be used where theproxyTimeout
variable was previously used.That being said, we would want to update the doc string for the existing
proxy-timeout
flag to indicate its update scope.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.
The reason I went in the direction I did is because users will set their timeouts based on the expected load and latency of their backends. So it made sense to me to keep the existing flag for that purpose.
That said, I'm happy to make the change you suggest. I just want to be sure that any users who don't set the new value get the current behavior. So we could create a proxy-client-timeout but use proxy-timeout if proxy-client-timeout isn't set.
I am a bit confused by the terminology. What is a "proxy client"?
I see the proxy-agent doing 3 things: (1) getting a list of pending requests from the IVP; (2) Pulling an individual request from the IVP; (3) Forwarding a request to a backend and waiting for a result. I think #1 and #2 are both proxy clients, since they call the IVP URL.
(I understand #3 goes through a host proxy, but I think of that as an implementation detail. When I hear "proxy" in this context, I think of just the IVP.)
Would it make sense to support 3 separate timeouts?
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 would be used as the timeout set on the HTTP client used to communicate with the proxy.
Agreed. I think the best way to do that is to require the value of the new flag to be larger than the value of the existing flag, explicitly raising it if it is not.
I don't think so. The agent makes three types of calls to the Inverting Proxy:
You could think of this as two broad actions:
So, having two separate timeouts makes sense, but having three would be overkill because the two other actions are both just part of processing a single request.
So, an alternative might be to name the new flag something like
request-timeout
orrequest-forwarding-timeout
.Thinking about it more, I think I like that better because it makes the existing
proxy-timeout
name make more sense in comparison, as in one case we are waiting for an individual request/response, but in the other we are only waiting on the Inverting Proxy.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.
Makes sense. In short, the change would:
WDYT?