[H-GEN] Squid cache selection
Bruce Campbell
bc at humbug.org.au
Thu Feb 24 05:34:15 EST 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
On Thu, 24 Feb 2000, Michael Anthon wrote:
mca> I set this up yesterday and I'm a bit confused as to why it didn't work the
mca> way I expected it to...
mca>
mca> cache_peer proxy.provider1.com.au parent 3128 3130 no-query weight=2
mca> cache_peer proxy.provider2.com.au parent 3128 3130 no-query weight=1
mca>
mca> I then disconnected the link to provider1 to see if it would
mca> then get pages from provider2, and it didn't. All I got was a
mca> page from squid with something like "(101) network unreachable",
mca> which was perfectly correct, but not what I had expected. I had
mca> expected squid to then attempt the proxy from provider2.
mca>
mca> Can anyone point out what I may have done wrong? Or is there a different
mca> setting somewhere I have missed?
The 'no-query' options does, for the most part, what it says.
Without 'no-query', Squid will send a quick ICP query using UDP to its
parent or sibling caches. This ICP query has two functions, it sees
whether a given remote server has the object requested, and whether the
remote server is there.
There are two replies to an ICP query, a definitive "I've got
it" (ICP_HIT) or a "I ain't got it" (ICP_MISS) message.
Squid will open a TCP connection to the cache that replies first with
an ICP_HIT, +/- weight loadings, and then try to retrieve the object.
If an ICP_MISS is received, Squid will not attempt a TCP connection to
that parent/sibling cache (unless it is the only one available because of
other rulesets). If *no* ICP response is received from a given cache (or
host unreachable) Squid will prefer one that does respond.
Of course, if no-query is turned on, Squid is not receiving immediate
feedback, and naturally assumes that a given cache is still there, and
blindly opens a TCP connection to that cache. If it happens to try a
cache which has a downed link, then... (luck of the draw)
Remove no-query. Check also the exact semantics of the 'weight' command.
Note that the behaviour of Squid without any specific tcp_outgoing_address
statements and differing IP addresses of the squid machines between
providers is undefined (Squid is designed for Servers. Servers generally
don't change IP addresses every 5 minutes ;) )
--
Bruce. | VP/BOFH
Infinite Monkeys. Infinite Keyboards. I see no Shakespeare. | HUMBUG
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list