[squid-users] Squid Name Resolution Question

Alex Rousskov rousskov at measurement-factory.com
Wed Jun 23 14:48:00 UTC 2021


On 6/23/21 9:02 AM, Garbacik, Joe wrote:
> I noticed that my squid server queries every second for the same
> destination (because we have a clients requiring access to this
> destination). My squid server does not have the negative_dns_ttl nor
> the positive_dns_ttl values set so I would expect that they are using
> the defaults. The destination has a 5 second TTL in DNS. My question
> is this, why does it still query so often if it should at least have
> the answer for five seconds?

I can think of two general reasons:

* The cached address is purged by other, newer addresses. See
ipcache_size and other ipcache_* directives in squid.conf.documented.

* Squid DNS TTL handling bugs. For example, Squid v4 does not have the
following v5 fix AFAICT:

>     Also fixed two DNS TTL bugs. Squid now uses minimum TTL among all used
>     DNS records[2]. Old ipcacheParse() was trying to do the same but:
>     * could overwrite a zero TTL with a positive value
>     * took into account TTLs from unused record types (e.g., CNAME).
>     [2] Subject to *_dns_ttl limits in squid.conf, as before.


Cache.log analysis with debug options set to "ALL,9" (or possibly just
"ALL,1 14,9") can determine the exact cause.

Alex.


More information about the squid-users mailing list