mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #1398] how to respond to backpressure when sending many queries #662
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#662
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 @cmusser on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1398
Creating a large number of concurrent queries managed with a
FuturesUnorderedcan result in a large proportion of failed requests. In the 0.19 release series, there didn't seem to be any limits on how many queries could be started. However, in tests with ~6 million queries, divided into 10000-query batches, I've seen 3/5 of the requests timeout. In 0.20, backpressure was introduced to prevent queries from overflowing internal resources. With that, if there are more than 32 active requests, subsequent ones result in aProtoErrorwith kind ofBusy.The question is: what's an effective strategy for using the
Busyreturn as a backpressure mechanism. The goal is minimize the chance of overflowing local system resources while still having lots of concurrent requests.I tried splitting the queries to be done into fixed size batches (each batch goes into a
FuturesUnordered) and then accumulating timeouts into a list to be retried again. That strategy eventually gets all the queries answers (given enough iterations of the retry logic), but it doesn't prevent packet loss in the first place. Some more specific questions are: