-
Notifications
You must be signed in to change notification settings - Fork 76
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
set timeout for bucket HEAD client #208
Conversation
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
@TerryHowe: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, TerryHowe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/lgtm |
func newHTTPClient() *http.Client { | ||
// ensure sensible timeouts | ||
// this client will be used to make HEAD calls | ||
return &http.Client{ |
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.
TODO: transport and connection reuse tuning, given the large amount of calls to same-host?
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.
so you reuse the same http client?
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.
we do, and that will implicitly use http.DefaultTransport
http client transport can be tuned for connection idle + reuse
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.
client reuse may actually be suboptimal (locks on shared resources like cookies etc) vs just ensuring transport reuse and tuning that.
Most advice about client re-use seems to be either related to transport reuse (which can instead be accomplished by passing a transport when constructing a client) or maybe allocation (not a primary concern here).
rebased |
/lgtm |
depends on #206
I haven't seen evidence that this is a problem yet, but it seems obviously problematic by inspection.
There is no default timeout on http.Client. We made a similar change for the listener.
It's possible to do more granular timeouts over e.g. dialing the connection, and other tuning, but this seems like the most important and simplest change.
/hold
Not sure if this counts as a bugfix ref: #181 as currently in practice we have very good response times and haven't seen this issue yet ... but it seems bound to happen.