Re: [squid-users] Load balancing multiple Squid servers

From: Duane Wessels <wessels@dont-contact.us>
Date: Thu, 18 Dec 2003 13:30:36 -0700 (MST)

On Wed, 17 Dec 2003, Cavanagh, Kevin B wrote:

>
> Hi there,
>
> Please forgive me if this question has been asked/answered before (I
> searched the FAQs but quickly became too confused by all the various
> postings regarding load balancing, etc).
>
> We currently have six RedHat Linux V8.0 servers running Squid V2.5
> Stable in the following parent/child proxy chain:
>
> User U Iprism URL filters Squid caching (child) HTTP Anti-virus
> (parent) Internet
>
> We have six of each - with each currently having a one-to-one
> relationship (ie. IPRISM1P SQUID1 AV1 INET, etc). We would like
> to create a load-balanced situation here if at all possible.

probably the only part we can help you with is the way that SQUID selects
which AV parent to send a request to.

One approach is to make a DNS name or /etc/hosts entry for the AV servers
that has all their IP addresses. Then you put a single line in squid.conf:

     cache_peer av-servers.example.com parent 1111 0 no-query

Another approach is to list all servers separately and use the round-robin option

     cache_peer 172.16.0.1 parent 1111 0 no-query round-robin
     cache_peer 172.16.0.2 parent 1111 0 no-query round-robin
     cache_peer 172.16.0.3 parent 1111 0 no-query round-robin
     cache_peer 172.16.0.4 parent 1111 0 no-query round-robin
     cache_peer 172.16.0.5 parent 1111 0 no-query round-robin
     cache_peer 172.16.0.6 parent 1111 0 no-query round-robin

Yet another approach is to use CARP:

     cache_peer 172.16.0.1 parent 1111 0 no-query carp-load-factor=0.16
     cache_peer 172.16.0.2 parent 1111 0 no-query carp-load-factor=0.16
     cache_peer 172.16.0.3 parent 1111 0 no-query carp-load-factor=0.17
     cache_peer 172.16.0.4 parent 1111 0 no-query carp-load-factor=0.17
     cache_peer 172.16.0.5 parent 1111 0 no-query carp-load-factor=0.17
     cache_peer 172.16.0.6 parent 1111 0 no-query carp-load-factor=0.17

Duane W.
Received on Thu Dec 18 2003 - 13:30:37 MST

This archive was generated by hypermail pre-2.1.9 : Thu Jan 01 2004 - 12:00:17 MST