[squid-users] Reverse proxy for multiple backends based on IP address?

From: Simon Waters <simonw_at_zynet.net>
Date: Mon, 22 Sep 2008 14:30:13 +0100

Looking in the achive, before 2.6, it looks like if you want to proxy for
several servers, then you need to separate the traffic based on the host name
part of the URL.

I was hoping to separate traffic based on destination IP address, but perhaps
someone will have a better idea?

i.e.

Proxy (has 2 IP addresses 1.2.3.4 and 1.2.3.5)

1.2.3.4:80 --> server 1 (2.3.4.5:80)
1.2.3.5:80 --> server 2 (2.3.4.6:80)

I have Squid 2.6 currently, and was wondering if this had changed with the
rewrite that affects reverse proxy config between 2.5 and 2.6.

Currently I have all traffic proxied to 2.3.4.5
And a list of exceptions:
 
 cache_peer_domain server1 !www.example.com
 cache_peer_domain server2 www.example.com

I have about ~1185 domains to add in this fashion, with more added routinely,
so some sort of automated procedure is a given. Also I was concerned if a big
list like this would impact performance.

The only other approach that occurs is to run a second instance of Squid
listening on the other IP address, which is probably what I'll do if no one
has a better idea.
Received on Mon Sep 22 2008 - 13:30:39 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 22 2008 - 12:00:02 MDT