Skip to content
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

internal/http_api: update NewDeadlineTransport() with new go http features #946

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

ploxiln
Copy link
Member

@ploxiln ploxiln commented Sep 25, 2017

More timeouts and limits were added to http.Transport in go-1.7.
Some that were enabled in http.DefaultTransport ended up disabled
in nsq's with-custom-timeouts http.Transport.
IdleConnTimeout in particular is helpful.

see DefaultTransport at https://golang.org/pkg/net/http/#RoundTripper
Not yet field-tested :)

@ploxiln
Copy link
Member Author

ploxiln commented Sep 25, 2017

When #942 was opened my thought was "why drop support for go-1.6 before having a good specific reason" - my C code works on compilers (and thus linux distros) from around the time Go was first released as beta. Anyway, here's a good reason I guess.

Reminder to self to update https://github.com/nsqio/nsqio.github.io/blob/master/_posts/2014-03-01-installing.md

Copy link
Member

@jehiah jehiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 ping here once you are ready for this to land?

if err != nil {
return nil, err
}
return &deadlinedConn{connectTimeout, c}, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we drop the deadlinedConn struct/methods above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, silly of me to leave that stuff

@mreiferson mreiferson changed the title internal http api: update NewDeadlineTransport() with new go http features internal/http_api: update NewDeadlineTransport() with new go http features Sep 25, 2017
@ploxiln ploxiln force-pushed the http_transport_update branch from 2358d54 to 6def508 Compare September 25, 2017 18:00
@ploxiln
Copy link
Member Author

ploxiln commented Sep 25, 2017

I plan to roll this out to a few servers tomorrow, and see how it does over a week or so.

…tures

More timeouts and limits were added to http.Transport in go-1.7.
Some that were enabled in http.DefaultTransport ended up disabled
in nsq's with-custom-timeouts http.Transport.
IdleConnTimeout in particular is helpful.
@ploxiln ploxiln force-pushed the http_transport_update branch from 6def508 to 51d9895 Compare September 26, 2017 03:04
@ploxiln
Copy link
Member Author

ploxiln commented Sep 26, 2017

(rebased just for testing purposes)

@ploxiln
Copy link
Member Author

ploxiln commented Sep 28, 2017

Everything seems to work. I'd say go ahead and merge this now.

I don't have the patience to complete the fully scientific side-by-side test case where I go a full week without touching two nsqadmin instances, one with this update and one without. I had it set up but one of the nsqadmin instances was used just now (for a legitimate purpose by a co-worker). I can set up a better test with some more effort but it'll be another week to reproduce the original problem. I'll still probably make an attempt, but I think this is probably a good general update, which is at least now sanity-tested to not immediately break anything.

@jehiah jehiah merged commit 27499a5 into nsqio:master Sep 29, 2017
@ploxiln ploxiln deleted the http_transport_update branch March 6, 2018 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants