diff --git a/conduwuit-example.toml b/conduwuit-example.toml index c40944d4..b5dd3b79 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -482,7 +482,9 @@ allow_profile_lookup_federation_requests = true # Minimum time-to-live in seconds for NXDOMAIN entries in the DNS cache. This value is critical for # the server to federate efficiently. NXDOMAIN's are assumed to not be returning to the federation # and aggressively cached rather than constantly rechecked. -#dns_min_ttl_nxdomain = 86400 +# +# Defaults to 3 days as these are *very rarely* false negatives. +#dns_min_ttl_nxdomain = 259200 # The number of seconds to wait for a reply to a DNS query. Please note that recursive queries can # take up to several seconds for some domains, so this value should not be too low. diff --git a/src/config/mod.rs b/src/config/mod.rs index df8fd3cd..46407448 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -515,8 +515,8 @@ impl fmt::Display for Config { ), ("Cleanup interval in seconds", &self.cleanup_second_interval.to_string()), ("DNS cache entry limit", &self.dns_cache_entries.to_string()), - ("DNS minimum ttl", &self.dns_min_ttl.to_string()), - ("DNS minimum nxdomain ttl", &self.dns_min_ttl_nxdomain.to_string()), + ("DNS minimum TTL", &self.dns_min_ttl.to_string()), + ("DNS minimum NXDOMAIN TTL", &self.dns_min_ttl_nxdomain.to_string()), ("DNS attempts", &self.dns_attempts.to_string()), ("DNS timeout", &self.dns_timeout.to_string()), ("DNS fallback to TCP", &self.dns_tcp_fallback.to_string()), @@ -890,7 +890,7 @@ fn default_dns_cache_entries() -> u32 { 12288 } fn default_dns_min_ttl() -> u64 { 60 * 180 } -fn default_dns_min_ttl_nxdomain() -> u64 { 60 * 60 * 24 } +fn default_dns_min_ttl_nxdomain() -> u64 { 60 * 60 * 24 * 3 } fn default_dns_attempts() -> u16 { 10 }