Re: [squid-users] Re: two outgoing gateway and two parent proxy with load balancing in squid proxy

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 14 Sep 2011 18:07:12 +1200

On 13/09/11 23:25, spacephai wrote:
> Thanks a lot Amos for your reply,
>
> Can i setup like this in the squid.conf for my two
> outgoing gateway and two parent proxy with load balancing in squid proxy
> problem.
>
>
> Let's suppose
>
> networkA on eth1 (ISP1 wan address)
>
>
> networkB on eth2 (ISP2 Wan address)
>
>
> eth0 is for LAN.All client in my network will points out this ip address as
> their gateway and proxy.
>
> acl networkA src 192.168.1.0/24
>
> acl networkB src 192.168.2.0/24
>

"src" is where your clients are. ie the LAN.

>
> cache_peer 1.2.3.4 parent 3128 3130 name=parentA allow-miss round-robin
> no-query
>
> cache_peer 5.6.7.8 parent 3128 3130 name=parentB allow-miss round-robin
> no-query
>
> cache_peer_access parentA allow networkA
>
> cache_peer_access parentA deny all
>
> cache_peer_access parentB allow networkB
>
> cache_peer_access parentB deny all
>
> Can i use like this or what is the best to do with multihomed load balancing
> squid proxy server?

This is not load balancing. This is connection forcing, all of clients
in LAN networkA to go out parentA. All of LAN networkB to go out parentB
with no crossover or balancing permitted.

To load balance, drop the cache_peer_access rules.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.15
   Beta testers wanted for 3.2.0.11
Received on Wed Sep 14 2011 - 06:07:29 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 15 2011 - 12:00:02 MDT