mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #1720] Add more substantial caching to the recursor #748
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#748
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 (Jun 6, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1720
Is your feature request related to a problem? Please describe.
Once #1710 is merged, we should add a new caching authority that sits in front of the recursor requests and make sure it is suitable for large numbers of requests. Consider making the max and min TTLs be configurable by record type as well.
Describe the solution you'd like
The recursive resolver has an LRU integrated to day, but it is not currently configurable. The max and min TTLs for the LRU should be exposed to the config file in the server for the recursor (these should be added to the forwarder/resolver config as well to be consistent).
@divergentdave commented on GitHub (Oct 25, 2024):
Is #2524 sufficient to close out this issue?
I think the recursor's internal LRU cache is preferable to the idea of a separate caching authority from the first paragraph. If the cache and the recursor were separated by a layer of encapsulation, that would preclude caching internally-generated queries for nameserver referrals, etc.
The forwarder/resolver config currently includes minimum and maximum TTL values. I did not add the ability to change these for particular record types to the resolver config, as I did to the recursor config. If there's interest in doing so, that should be straightforward, though we'll have to decide what the configuration should look like, and how to handle backwards compatibility of
positive_min_ttl, etc. at the top-level ofResolverOpts.@bluejekyll commented on GitHub (Oct 25, 2024):
This looks great! thanks for getting all those changes in. I agree that I think this is resolved with your changes.