-
Notifications
You must be signed in to change notification settings - Fork 18k
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: DNS lookup API with timeouts #4890
Labels
Comments
There are nine Lookup functions in package net. This would mean adding nine new functions, taking timeouts. To understand your motivation for wanting this, were you actually hitting problems with the number of fds or threads for the DNS/cgo calls? And which OS? On Linux at least we could use getaddrinfo_a (see http://www.imperialviolet.org/2005/06/01/asynchronous-dns-lookups-with-glibc.html and http://www.kernel.org/doc/man-pages/online/pages/man3/getaddrinfo_a.3.html) but even that API doesn't really seem to do timeouts efficiently, probably because the underlying NSS / resolver(3) mechanisms don't really support timeouts. Your best bet probably is to not use the system's DNS facilities and use a pure Go DNS resolver (maybe https://github.com/miekg/dns, which seems popular), where you'll have more control. Labels changed: added priority-someday, removed priority-triage. Status changed to Thinking. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: