mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #1920] [MERGED] Add the possibility to shuffle NameServers #2698
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#2698
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/1920
Author: @Edu4rdSHL
Created: 4/14/2023
Status: ✅ Merged
Merged: 6/5/2023
Merged by: @bluejekyll
Base:
main← Head:shuffle-dns-servers📝 Commits (10+)
79cbce2Add the possibility to shuffle NameServersef2cd4bSet the default value forshuffle_dns_serversto false.a0cfff6Merge branch 'main' of https://github.com/Edu4rdSHL/trust-dns2b04876update changelog for 0.23a0ca84dupdate version to 0.23-alpha.14d2c50fupdate h2 dependency due to vuln warning42f8c0acleanliness updates forrustc 1.69b42bfdfcleanup workspace features1db3319use workspace for all common package details8c3e58bcleanup required features📊 Changes
2 files changed (+21 additions, -2 deletions)
View changed files
📝
crates/resolver/src/config.rs(+3 -0)📝
crates/resolver/src/name_server/name_server_pool.rs(+18 -2)📄 Description
Hello, this PR makes it possible to shuffle DNS NameServers to avoid overloads to the first configured ones.
The default value for
shuffle_dns_serversis set to true, it greatly improves performance in all kinds of tasks so IMO it makes sense to default to it. For comparison:A lookup for 11500 hosts, having 1000 resolvers, and using 100 threads takes ~10 minutes to complete, with this change it only takes 55 seconds. That means ~10x of performance increase.
It's the continuation of https://github.com/bluejekyll/trust-dns/pull/1632, I have tried implemeting
SmallRng, however I haven't had success because it doesn't implementSendand therefore can't be send between threads safely.It can be improved in the future, but for now I think that it's a good start.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.