-
Notifications
You must be signed in to change notification settings - Fork 443
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
consumer: reuse lookupd http client #333
Conversation
@ploxiln Thank you for your review, i have finished these modifications, please review it again. |
UPGRADING.md
Outdated
@@ -173,7 +173,7 @@ conforming to standard library logging conventions. | |||
|
|||
#### Misc. | |||
|
|||
Un-exported `NewDeadlineTransport` and `ApiRequest`, which never should have been exported in the | |||
Un-exported `ApiRequest`, which never should have been exported in the |
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.
you can leave this as it was; it's still true that NewDeadlineTransport
was un-exported (and then now has been un-existed ;)
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.
If you undo this little change to UPGRADING, and squash down to one commit (with cleaned-up commit message), I'll merge.
Timeout: r.config.LookupdPollTimeout, | ||
KeepAlive: 30 * time.Second, | ||
}).DialContext, | ||
ResponseHeaderTimeout: r.config.LookupdPollTimeout, |
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 seems redundant with the http.Client
Timeout
but I guess it's fine.
(Dialer Timeout above could probably be a shorter default, probably matching the 10s TLSHandshakeTimeout below. But again, I guess it's fine, doesn't really hurt.)
emmm, can request a review to other people? @ploxiln |
d391d2a
to
c238b8d
Compare
Problem
After some wrong happend on my machine, i found there are many
TIME_WAIT
status.I have many nsqd topics and n consumers, consumer making http request which not using
Keep-Alive
causes this problem.Solution