Understanding NextDNS in router mode
I recently installed NextDNS in a Raspberry Pi with NextDNS as a proxy server. I have a few issues, but I want to understand where the log of missed resolutions is located because in the output those are not listed, only cached or expired, but expired doesn't count as the same number of misses.
This is the output of "nextdns cache-stats"
{
"hit": 4514,
"miss": 10674
}
Moreover, this amount of "miss" count is too much, or could it be expected behavior?
2 replies
-
Cache hit means when the client queries the DNS records that are still stored in the cache. Cache miss means the DNS records have expired in the cache, the client queries the records again.
; <<>> DiG 9.16.28 <<>> nextdns.io ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19612 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;nextdns.io. IN A ;; ANSWER SECTION: nextdns.io. 77 IN A 172.67.68.89 nextdns.io. 77 IN A 104.26.10.186 nextdns.io. 77 IN A 104.26.11.186 ;; Query time: 2 msec ;; SERVER: 45.90.28.0#53(45.90.28.0) ;; WHEN: Fri Nov 08 09:29:24 SE Asia Standard Time 2024 ;; MSG SIZE rcvd: 87
Looking at the query result using the dig command above, 77 is the 77 seconds the DNS record is stored in the cache. If the client queries within the remaining 77 seconds, it is called a cache hit. If the client queries after 77 seconds, it is called a cache miss.
-
I've gained a clearer understanding of how NextDNS handles caching after reviewing the explanations. I've experimented with the '
cache-max-age'
and 'max-ttl'
settings to observe their effects.I'm a bit confused about the interplay between these two settings. The built-in help suggests that '
cache-max-age'
can override 'max-ttl'
, implying that any value assigned to 'max-ttl'
will be ignored if 'cache-max-age'
is lower. If that's the case, why have both settings?It seems that '
max-ttl'
primarily controls the time a DNS record is stored in the cache, while 'cache-max-age'
can be used to force an earlier expiration. Is this interpretation correct?
Content aside
- 11 days agoLast active
- 2Replies
- 87Views
-
3
Following