sexta-feira, fevereiro 15, 2013

Squid transparant load balance how-to

Squid transparant load balance how-to
pfsense make squid use gateway group


For the last couple of weeks/months i've been trying to get squid to loadbalance/failover using gateway-groups. (in vmware)

Currently i'm at the point that i'm able to get it working with VERY BAD PERFORMANCE. 
I believe some minor tweaks are still needed but i'll publish what i have so far and hope someone will figure out how to get it right.

my wan ip: (gw=
my opt1 ip: (gw=
my lan ip: (gw=gateway-group)

1. install latest snapshot & configure your interfaces (i'm using the 2011/01/20 snapshot)

2. in system-->routing add gateways for all interfaces
    in the group tab add a loadbalancing group (tier 1 , all interfaces)

3. make sure to add the gateways to the WAN/OPT interface (interface menu)

4. Firewall rules:

details about the floating rule see this pdf:
or bellow

note the state-type !!! <-- bad="" but="" causes="" doesn="" i="" it="" m="" performance="" pretty="" span="" sure="" t="" the="" this="" without="" work="">
also: don't forget the gateway-group

5. Nat rules:

6. Install squid (system-->packages-->squid)

7. Configure squid bellow
note the 'tcp_outgoing_address' directive at the bottom.

I hope some people will find this useful and perhaps come up with a solution for the performance issue.
my complete config can be downloaded here:

Nenhum comentário: