Squid load balancing and reverse proxy conflicts

load balancingreverse-proxysquid

I'm having difficulties configuring Squid 3.3 to do both "load-balancing" over multiple WAN links (using random ACLs + tcp_outgoing_address options) and to also have a "reverse proxy".

It works just fine when I configure the one (load balancing) or the other (reverse proxy), but when both are configured, the reverse proxy no longer works correctly.

Packet captures show the reverse proxy traffic that would normally be send out on the LAN interface, is now being output on the WAN interface instead (and therefore doesn't reach the internal hosts on the LAN). Clearly something about the "tcp_outgoing_address" setting is also being applied to the reverse proxy traffic too, instead of just the forward proxy traffic.

Below is what I use for the load balancing config:

acl fiftyPercent random 0.5
tcp_outgoing_address <<WAN1-IP-HERE>> fiftyPercent
tcp_outgoing_address <<WAN2-IP-HERE>>

Refer – http://wiki.squid-cache.org/Features/AclRandom

I know too little of Squid and my searches of countless posts have yielded nothing (yet). Does anyone know how I can apply the load-balancing to only apply to forward proxy traffic, and still have the reverse proxy traffic work as if it isn't set?

Best Answer

Create an ACL for the reverse-proxy traffic and set tcp_outgoing_address <<LAN-IP-HERE>> for it.