mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #2225] Default dns timeout of 5 seconds is excessive (causes 40s of time being wasted in mongodb) #929
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#929
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 @Jasper-Bekkers on GitHub (May 29, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2225
In depth analysis downstream: https://github.com/mongodb/mongo-rust-driver/issues/1112
Changing the timeout value to 100ms in
ResolverOptsspeeds things up significantly (to acceptable levels).The biggest question is where do we make the change (either reduce the default in this crate) or figure out a better way to drive this crate from mongodb. It does however appear that (at least on windows)
ResolverOptsis set with this same default value inread_system_confwith no real way of modifying this value later.@djc commented on GitHub (May 30, 2024):
Agree that 5 seconds is probably excessive. Where does the 8x multiplier come from, is that inside Hickory?
I think it would make sense to change the default but would also like to make
ResolverOptseasier to change after construction (see also https://github.com/hickory-dns/hickory-dns/issues/2188#issuecomment-2069314665).Are you able to submit a PR?
@Jasper-Bekkers commented on GitHub (May 30, 2024):
I think the 8x multiplier is from mongo directly where it may try 8 servers in a pool or something.
I tried looking into this, but it feels like this is closer related to some moving parts then I'd feel comfortable changing. If its just lowering the default I can do that, but exposing the timeout more widely looks like it requires some thinking specifically when it comes to the system level defaults.
@djc commented on GitHub (May 30, 2024):
Okay, can you just do a PR for changing the default?
@bluejekyll commented on GitHub (May 30, 2024):
Can we instead make the PR focused on making the timeout easier to set? I don't think we can assume resolvers always operating inside a single datacenter, and need to assume that real-world latencies, like trans-atlantic or trans-pacific round-trips of >500ms are normal.
@Jasper-Bekkers commented on GitHub (May 30, 2024):
Yeah that's why I also was hesitant.
Apparently this was a Known Issue for mongodb with this crate, specifically on Windows. So maybe it's just a regular bug? https://crates.io/crates/mongodb#windows-dns-note