On Tuesday 08 January 2002 09.20, Stuart Smith wrote:
> Ah, well, thats what I'd have thought, but without it, as squid is a
> child, with one parent it expects all requests to be services from its
> parent (my process). So requests for content outwith the domain my
> process is serving (cnn.com in this example), will not be serviced by
> me. Squid won't go direct as it's a child, so user requests fail.
What error are you returning when you receive requests not acceptable to 
you?
> Well, I'd certainly like to get rid of it too. I seems a bit of a bodge,
> but hopefully your first suggestion (ICP_MISS_NOFETCH) might work.
What works is if your "psuedo parent" are returning a correct HTTP error 
when you receive HTTP requests you won't forward.
Returning ICP_MISS_NOFETCH helps, as this tells the requesting Squid that 
while you are indeed a parent, you cannot accept that request at this time.
The fact that "the looping" works around the problem with you not 
returning correct errors is in fact a minor "bug/misfeature" in the peer 
selection algorithms and is not guaranteed to remain so. Squid currently 
only selects one peer as a viable path for forwarding the request, where 
it most often should select a few of your configured peers in priority 
order. This bug/misfeature is quite notable when behind a firewall 
(never_direct allow), but to lessen the negative impact in such 
configurations Squid then adds all your configured parents as possible 
"ANY" paths.
DIRECT is always added as a last resort, used if Squid fails to forward 
the request using any of the selected peers.
The gory details of how peer selection builds the list of viable paths:
0. Peer selected by cache digests (HIT only)
1. Peer selected by ICP
if always_direct allow, or other "always direct" cases:
   2. Direct
if never_direct allow
   2. Some parent
   3. All parents, in the order listed in squid.conf
if prefer_direct on
   2. Direct
   3. Some parent
if prefer_direct off
   2. Some parent
   3. Direct
Definition of "Some parent":
   One of the following, in priority order
   a) "default"
   b) "round-robin"
   c) "First up" (in order of squid.conf)
   d) "Any" (basically first usable in squid.conf)
-- MARA Systems AB, Giving you basic free Squid support Customized solutions, packaged solutions and priority support available on requestReceived on Tue Jan 08 2002 - 02:56:42 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:40 MST