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

fixing incorrect 4.4.4.4 DNS reference(s) in examples #41803

Closed
ghost opened this issue Feb 1, 2022 · 2 comments · Fixed by #51377
Closed

fixing incorrect 4.4.4.4 DNS reference(s) in examples #41803

ghost opened this issue Feb 1, 2022 · 2 comments · Fixed by #51377
Labels
dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations.

Comments

@ghost
Copy link

ghost commented Feb 1, 2022

Affected URL(s)

https://nodejs.org/api/dns.html#dnspromisesreverseip

Description of the problem

fixing incorrect 4.4.4.4 DNS reference(s) in various examples,
to (what I assume) should be 8.8.8.8/8.8.4.4/dns.google (Google DNS 1 2 3).

note

not sure what the source of this mistake is
(I think it was an old Verizon name server),
but I see this a lot and not just in n00b codes,
but in big a$$ companies as well..

in most cases running the code in the example will just render a timeout (and a puzzled developer),
in other cases (silent fallback..) it may go through the os default name resolving chain which will render some unexpected results and be somewhat challenging to debug.. :|


edit:

IP address ranges that are designated for use in documentation 1
I would prefer a working example.

edit:

  1. https://github.com/features/code-search/signup
  2. https://cs.github.com/?scopeName=All+repos&scope=&q=repo%3Anodejs%2Fnode+%224.4.4.4%22
@ghost ghost added the doc Issues and PRs related to the documentations. label Feb 1, 2022
@maruf061
Copy link

maruf061 commented Feb 1, 2022

Thanks for sharing

@VoltrexKeyva VoltrexKeyva added the dns Issues and PRs related to the dns subsystem. label Feb 1, 2022
@tniessen
Copy link
Member

tniessen commented Feb 1, 2022

It is indeed strange that the IPv6 address seems to point to Google but the IPv4 does not. On the other hand, these are just meant as an example and we don't want to push users toward using any specific company's DNS provider. (Putting my Cloudflare hat on: 1.1.1.1 is faster than 8.8.8.8.) There are IP address ranges that are designated for use in documentation that we could use.

in most cases running the code in the example will just render a timeout (and a puzzled developer)

Users should only call setServers if they have a good reason not to use the system's DNS resolver settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants