Re: alternate parent selection algorithms

From: Duane Wessels <wessels@dont-contact.us>
Date: Wed, 28 Oct 1998 13:51:52 -0700

Niilo Neuvo writes:

>I am in the process of writing a method to add an alternate parent
>selection algorith. What I want to do is to add a custom C-function
>to the squid executable and call that function with the URL being
>requested to determine the correct parent. After thinking about the
>different approaches possible with this method it seems that I am
>unable to write an algorithm to suit the needs of every Squid
>administrator. So it seems that a generic squid parent selection api
>would do the trick.
>
>squid.conf would read:
>cache_peer /foo/file.so:func parent 3128 3130 proxy-only,default,parent_proc
>
>I would add a few lines to cache_cf.c parse_peer -function:
> - dlopen() the .so file
> - add the function from .so to peer structure
>A few lines to forward.c fwdStartComplete -function:
> - if(p->options.parent-proc)
> - call the function with the url as a parameter
> - and store the returned values to s->host, s->port
>
>In addition to this ./configure needs to be modified to somehow
>support dlopen() and the sometimes required -ldl library. I have
>never written a ./configure and am a little unfamiliar on how it
>works.
>
>The reason why I am explaining you all this is that I don't want to
>support my own branch of squid. I'd rather see my patch added into
>the squid release at some stage. Please inform me if this approach is
>something you'd like to be implemented in squid (otherwise I have to
>start living with apache and the horrible amounts of memory it uses).

We can probably add this to our source tree, most likely in
#ifdefs.

Send us a patch and we'll check it out.

Duane W.
Received on Tue Jul 29 2003 - 13:15:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:57 MST