On Tue, 22 Mar 2011 14:34:49 -0300, N3O wrote:
yeah but the problem of that is you have to keep checking on the
squid
logs. i prefer if its possible to do the IP response headers thing,
just
for the name of simplicity. Is it possible??
Greetings
On Tue, Mar 22, 2011 at 12:50 PM, Giles Coochey wrote:
On 22/03/2011 16:40, N3O wrote:
is it possible to get squid to write its IP as a response header??
i'm
using a two node caching layer with a load balancer between them,
and
my idea is to confirm that both squids and if the load balancer is
distributing requests.
ÂAny idea how to implement this on squid??
Greetings
Can't you just check the squid logs to see they are both receiving
and
processing requests??
I have a load balanced pair of squids, I know the load balancing is
working
because I didn't set the acls right during initial set up and I saw
responses from different hostnames.
What you are looking for is the Via: header. This is a mandatory header
where each proxy adds its own $unique_hostname as is passes through. It
is sent in both request and reply.
For example; if your top layer is called squid1 and your bottom layer
is balanced between squid2 and squid3.
Your server will see:
Via: ..., 1.1 squid1.example.com (squid), 1.0 squid2.example.com
(squid)
or
Via: ..., 1.1 squid1.example.com (squid), 1.0 squid3.example.com
(squid)
The client will see:
Via: ..., 1.0 squid2.example.com (squid), 1.0 squid1.example.com
(squid)
or
Via: ..., 1.0 squid3.example.com (squid), 1.0 squid1.example.com
(squid)
or (on HITs)
Via: ..., 1.0 squid1.example.com (squid)
Depending on your squid version and setup (forward/reverse/transparent)
you may also get X-Client headers out of Squid on the reply back to
client saying whether it was a HIT/MISS at each layer.
Amos