[squid-users] Squid reverse proxy cache_peer failover

Amos Jeffries squid3 at treenet.co.nz
Tue Jan 19 15:04:37 UTC 2016


On 20/01/2016 1:05 a.m., Veiko Kukk wrote:
> Hi,
> 
> I did read documentation and googled for that, but did not find anything
> really useful.
> 
> I'm using Squid 3.5.13 and trying to achieve that with multiple
> cache_peer parents, only one is used if it is available. Only when it's
> not available, secondary is used. Something like this in configuration:
> 
> 
> cache_peer foobar name=cache1
> cache_peer barfoo name=cache2
> 
> if cache1 accessible, use it, else use cache2.
> 
> 
> I did not find any 'backup' or 'priority' option for cache_peer
> configuration. For example, haproxy allows configuring some backend
> servers with keyword 'backup' and those servers are accessed only when
> main server(s) are down.
> 
> How would that be possible with squid?

In Squid it is done simply by ordering the cache_peer lines. With the
primary peer first, secondary second, and so on.

Amos



More information about the squid-users mailing list