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

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

> You can get close by doing the following:
>
> 1. Set it up as a parent
> 2. prefere_direct off
> 3. Instead of returning ICP_MISS, return ICP_MISS_NOFETCH
> 4. If you after all get a request, return a small 504 error.
> Squid should
> automatically recover.

I'll look into this. thanks.

>
> > Also, the subset of the internet I am handling might change. When it
> > does, and I am now handing say cnn.com which I didn't
> before, I purge
> > squid of all cnn.com stuff. It then sends out its
> ICP_QUERYs again and
> > gets an ICP_HIT next time.
>
> This is a bit of a problem. To purge all of cnn.com you need
> to keep track
> of which URL's you (Squid) have cached for cnn.com. Squid does not.
>

I am using a purge script for this which uses regular expressions to purge
squid. this bit works fine.

> > cache_peer 127.0.0.1 parent 80 9999 proxy-only weight=1
> > cache_peer 127.0.0.1 parent 3128 3130 weight=2
>
> The reference to itself is of no use, as Squid always rejects
> requests
> from itself, telling the requesting Squid that it has
> selected a bad path.
> Recovery applies.

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.

> You would get the same thing if you got rid of the reference
> to self I
> think.

As I say, it doesn't work without the looping reference.

>
> > So, my question is.. is having Squid as it's own parent in this way
> > reliable with future versions ? i.e. is it defined
> behaviour that if it
> > detects that an HTTP request has come from itself, that it
> realises that
> > it is a loop, and does start sending out more ICP requests
> and looping
> > for ever, but rather gets it from the source right there and then ??
>
> Loop detection is guaranteed to be there, but I don't see the
> value of at
> all triggering such loops in your setup.

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.

thanks.

stu
Received on Tue Jan 08 2002 - 01:19:11 MST

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