From: Ondřej Surý Date: Fri, 21 Mar 2025 05:17:55 +0000 (+0100) Subject: Reduce QPDB_VIRTUAL to 10 seconds X-Git-Tag: v9.21.8~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ed821beb4eb7ae6e04e4cc9d772b7e11f7f3c05;p=thirdparty%2Fbind9.git Reduce QPDB_VIRTUAL to 10 seconds The *DB_VIRTUAL value was introduced to allow the clients (presumably ns_clients) that has been running for some time to access the cached data that was valid at the time of its inception. The default value of 5 minutes is way longer than longevity of the ns_client object as the resolver will give up after 2 minutes. Reduce the value to 10 seconds to accomodate to honour the original more closely, but still allow some leeway for clients that started some time in the past. Our measurements show that even setting this value to 0 has no statistically significant effect, thus the value of 10 seconds should be on the safe side. --- diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 3b7f5680b1d..ab44cf1d36f 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -122,10 +122,10 @@ #define HEADERNODE(h) ((qpcnode_t *)((h)->node)) /* - * Allow clients with a virtual time of up to 5 minutes in the past to see + * Allow clients with a virtual time of up to 10 seconds in the past to see * records that would have otherwise have expired. */ -#define QPDB_VIRTUAL 300 +#define QPDB_VIRTUAL 10 /* * This defines the number of headers that we try to expire each time the