mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #650] syncrhonous Resolver should maintain conn pool across uses #262
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bluejekyll on GitHub (Jan 7, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/650
Is your feature request related to a problem? Please describe.
See comment: https://github.com/bluejekyll/trust-dns/issues/532#issuecomment-451251197 where the usage of the synchronous Resolver is expected to maintain connections across uses.
Describe the solution you'd like
The Global Resolver described in #462 is most-likely the best option. An issue to determine is how to make that programatically configurable.
Describe alternatives you've considered
Another option would be to rely on tokio's background processing, but this needs to be researching.
Additional context
The synchronous Resolver does not hold a reference to a Tokio runtime, to ensure that it itself is Send/Sync, see documentation here: https://docs.rs/trust-dns-resolver/0.10.2/trust_dns_resolver/struct.Resolver.html
@bluejekyll commented on GitHub (Jan 7, 2019):
FYI @juliangehring
@bluejekyll commented on GitHub (Jan 7, 2019):
Hm, When the decision was made to not carry the old
Tokio::Coreit appeared that there was no way to have aSend+Syncsyncronous Resolver. This appears to have changed. As tokio::Runtime now appears to beSend+Sync. This means it's possible for the Resolver to have a Runtime.This is probably the easiest patch for the issue.
@juliangehring commented on GitHub (Jan 13, 2019):
Thanks, it works very well now!
@bluejekyll commented on GitHub (Jan 13, 2019):
Thank you for the feedback. It does have a downside of locking between threads on queries, if you share the instance across threads. Just making sure you’re aware of that downside.