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

net: remove hot path comment from connect #4648

Merged
merged 1 commit into from
Jan 12, 2016

Conversation

evanlucas
Copy link
Contributor

This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

Ref: #4642

@evanlucas evanlucas added the net Issues and PRs related to the net subsystem. label Jan 12, 2016
@benjamingr
Copy link
Member

Sorry for the silly question - why is the assumption false?

@evanlucas
Copy link
Contributor Author

Not a silly question at all. I consider it to be false because we have to use the system resolver (which is what dns.lookup does) to determine what IP should be used for localhost. More information on that can be found at https://nodejs.org/dist/latest-v5.x/docs/api/dns.html#dns_implementation_considerations. As the entire point of the original commit was to bypass calling dns.lookup to prevent running in the threadpool, it makes trying to do anything with localhost specifically unnecessary (unless there is another way to determine the IP for localhost of which I am not aware).

@evanlucas
Copy link
Contributor Author

For reference, the commit where this was added was 1bef717

@mscdex
Copy link
Contributor

mscdex commented Jan 12, 2016

LGTM

@benjamingr
Copy link
Member

Hmm, I guess someone can override it to be something other than ::1 (v6) or 127.0.0.1 (v4) and Node cannot be the one to make that assumption. Users can always optimize it at their end.

LGTM.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 12, 2016

LGTM

This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: nodejs#4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@evanlucas evanlucas closed this Jan 12, 2016
@evanlucas evanlucas deleted the netrmcomment branch January 12, 2016 15:58
@evanlucas evanlucas merged commit 3a7f106 into nodejs:master Jan 12, 2016
@evanlucas
Copy link
Contributor Author

Landed in 3a7f106. Thanks!

MylesBorins pushed a commit that referenced this pull request Jan 12, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: #4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 12, 2016
MylesBorins pushed a commit that referenced this pull request Jan 28, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: #4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 11, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: #4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Feb 11, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: nodejs#4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 11, 2016
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Feb 15, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: nodejs#4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: nodejs#4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants