-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Don't use a thread pool for DNS resolution #1235
Comments
Do I understand correctly that tokio-dns-unofficial uses the host OS's resolver via a thread pool? In that case I find the name of the issue a bit misleading. How about "Don't use synchronous host OS's dns resolver via thread pool"? Async in process dns resolutionIn case an in-process DNS async resolver adhering to Async OS dns resolutionOr in case we mostly target Linux and fall back to synchronous DNS resolution, something like What do you think @tomaka? |
I think that we shouldn't waste any energy on that issue, at least not before async/await. |
For what it's worth, async-std decided to use background tasks: async-rs/async-std#74 |
I think we could use either trust-dns or libasr. The latter is a C library, but it comes from OpenBSD and is used in OpenSMTPD among other projects, so I am quite confident in its security. |
Right now, we use a thread pool dedicated to resolving domain names by calling
to_socket_addrs
. Theoretically, there's no reason for it not to be asynchronous.In practice, as far as I know, there's no way to do at at the moment. However I'm opening this issue anyway in order to not forget about that in the long term.
The text was updated successfully, but these errors were encountered: