On Tue, 7 Jun 2011 13:35:33 -0300, Soporte Técnico wrote:
I have 2 two parents for my main squid (Freebsd).

I want to load balancing to each one parent the par ip (odd) and the impar
ip (even).

Ex.
acl pares src 192.168.0.10, 192.168.0.12, 192.168.0.14, 192.168.0.16
192.168.0.254

acl impares src 192.168.0.11, 192.168.0.13, 192.168.0.15, 192.168.0.17 ..
192.168.0.253



May I have 2 files ?
<snip>

This would work ?

Yes, but...

The speed there´s not going to be slow in because this large acl files?

Well its relatively very fast. But slower than any of the options below...


There´s another way to do this more intelligent.


What you ask for is better done via bitmask:

 acl even src 0.0.0.0/0.0.0.1

 cache_peer_access A allow even
 cache_peer_access B allow !even

Note: this is IPv4-only.


Or you could use real load balancing algorithms built into Squid ...

 cache_peer A ... sourcehash
 cache_peer B ... sourcehash

or

 cache_peer A ... round-robin
 cache_peer B ... round-robin

or

 cache_peer A ... carp
 cache_peer B ... carp



Amos

Reply via email to