mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #484] [MERGED] resolver: Add config in ResolverOpts to set an optional minimum TTL for cached records #1475
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#1475
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/484
Author: @hawkw
Created: 5/22/2018
Status: ✅ Merged
Merged: 5/25/2018
Merged by: @bluejekyll
Base:
master← Head:eliza/min-ttls📝 Commits (9)
b146394resolver: Add optional minimum TTL to DnsLru97732adresolver: Add optionalcache_min_ttlconfiguration to ResolverOpts4be6c52resolver: Test the TTLs of lookups returned by a cache with a min TTLdef13b0resolver: Add separate minimum TTLs for positive and negative responsesfef5f93resolver: Configure DnsLru min TTLs with a builder7ca595eMerge branch 'master' into eliza/min-ttlsbf74a6eresolver: replace LruBuilder with a TtlConfig struct9de5612resolver: make use of default cache TTLs explicit1acd4daMerge branch 'master' into eliza/min-ttls📊 Changes
5 files changed (+164 additions, -25 deletions)
View changed files
📝
resolver/src/config.rs(+12 -0)📝
resolver/src/dns_lru.rs(+124 -10)📝
resolver/src/lookup_state.rs(+11 -11)📝
resolver/src/resolver.rs(+9 -2)📝
resolver/src/resolver_future.rs(+8 -2)📄 Description
This PR adds an optional
cache_min_ttlfield toResolverOpts, which, ifset, will cause the underlying
DnsLrucache to limit all TTLs to that minimumvalue. Queries with records whose TTL is under the minimum will have their TTL
set to the minimum value instead.
We want the ability to set a minimum TTL for DNS responses in Conduit so as to
limit the rate at which the Conduit proxy queries DNS in development mode
(see runconduit/conduit#711). I originally implemented this functionality in the
Conduit proxy, but @briansmith suggested that it should be implemented in
Trust-DNS, instead.
Signed-off-by: Eliza Weisman eliza@buoyant.io
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.