[squid-users] Failover using Cache Peer feature.

Alex Rousskov rousskov at measurement-factory.com
Thu Sep 8 02:25:59 UTC 2022


On 9/7/22 17:28, Marcelo wrote:

> Is there a way to use Cache Peer feature to send traffic to Squid number 
> 2 if Squid number 1 does not respond in N seconds?

The correct answer probably depends on your definition of "respond" but 
see if the cache_peer connect-timeout option[1] is what you are looking 
for. That option defines "respond" as "establish a TCP connection with 
that peer known IP address". You probably want to mark those peers as 
parents and use the "first-up" peer selection algorithm[2] (which is the 
default).

[1] http://www.squid-cache.org/Doc/config/cache_peer/
[2] https://wiki.squid-cache.org/Features/LoadBalance#First-Up_Parent


HTH,

Alex.


More information about the squid-users mailing list