From: Amos Jeffries <squid3@xxxxxxxxxxxxx>
Subject: Re: Some queries about cache_peer
To: bijayant4u@xxxxxxxxx
Cc: "squid users" <squid-users@xxxxxxxxxxxxxxx>
Date: Thursday, 31 July, 2008, 9:31 AM
Hello list,
I tried to set up cache_peer, but i could not
understand that it has setup
or not. Please give some inputs.
Scenario:-
I have setup three proxy-servers.squid 3.0.7 Stable
proxy1 192.168.99.134
proxy2 192.168.99.135
proxy3 192.168.99.121
Lan Computer 192.168.99.23.
On my Lan Computer, i have configured proxy in my
browser as
192.168.99.134 ie proxy1. All request first go to
proxy1.
In Proxy1 squid.conf:-
cache_peer 192.168.99.135 parent 3128 3130
proxy-only default
cache_peer 192.168.99.121 parent 3128 3130
proxy-only
cache_peer_domain 192.168.99.135 .com
cache_peer_domain 192.168.99.121 .net
In proxy2 and proxy3 no cache_peer is configured.
I can browse the web. But i didnt understand the
working. I have some
queries regarding this scenario:
If the page is not in any of the proxy server, then
which proxy server
will go to internet and fetch for the user. I mean if
user access any
".net" domain then the request will come to
the proxy1 first, it will
query to the proxy3, if its there it will be delivered
else the page will
be fetched from the internet ,Same is for the
".com" domain right?
Usually. If netdb/icmp has been enabled squid will keep
records of
response times and go to whichever of peer/web responds
fastest. thinking
fastest available service is usually best to use.
Check your access.log for info on which is being selected
for each request.
Then my question is,
1) which server will query to the internet for the
page which is not in
the cache ie ".net" dedicated server or the
main proxy1 server?
Under only cache_peer_domain, maybe both. Use
'never_direct' to force
requests to go via peers.