[squid-users] DNS round-robin behaviour

Amos Jeffries squid3 at treenet.co.nz
Fri Jul 11 12:07:06 UTC 2025


pPS, Please start a new thread for each topic.

On 11/07/25 21:54, paolo.prinx wrote:
> Hello all,
>      quick question, how does Squid behave when it receives a DNS 
> response containing multiple IP addresses? Does it pick a random one in 
> the list, or does it stick to a certain order?

The order given by DNS is the order used. Except that when both are 
available IPv6 are preferred over IPv4.


> 
> In our config, we have squid pointing to a pool of dnsdist resolvers, 
> that implement a local packet cache with a 300-second TTL. We are seeing 
> unbalanced traffic distributions, was wondering if there is anything we 
> should configure on the Squid side, or if we should instead look to 
> change the responses returned by the DNS resolver.
> 
> Any suggestion?
> 

DNS alone is not sufficient to balance traffic. There are many factors 
involved including HTTP multiplexing, pipelines, variability of message 
sizes, and network RTT on each connection.

The best way to balance traffic is with proper QoS tools. DNS and HTTP 
proxy are optimized towards service speed - not load redundancy (which 
actually reduces peak performance).


HTH
Amos



More information about the squid-users mailing list