RE: [squid-users] forwarding looping: acceptable for my config ?

From: Stuart Smith <stuart.smith@dont-contact.us>
Date: Tue, 8 Jan 2002 10:08:47 -0000

> 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 firstly (when I only had the one entry with me as a parent), I tried
returning a 404 and also just tried closing the socket and returning nothing.

>
> > 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.

ah. well, that could be a part of it then. I assumed that on any error
code it would go DIRECT. Prob. a 404 isn't the best one to send then. As
you suggest, a 504 (or maybe a 502?) is worth trying.

>
> 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.

Sounds good.

>
> 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.

Right, I definately need to change this then.

> 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)

thanks, this is exactly what I needed.

stu
Received on Tue Jan 08 2002 - 03:07:48 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:40 MST