alternate parent selection algorithms

From: Niilo Neuvo <niilo.neuvo@dont-contact.us>
Date: Wed, 28 Oct 1998 20:49:45 +0200

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).
 
As a background: I maintain a cache-server farm consisting of 4
machines at the moment. The overhead of sending ICP-queries back and
forth is stopping me from expanding the cache with more machines. We
deliver about 10 million queries a day. This means 7.5M*3 (22.5M) ICP
queries per day received by a single cache. With 8 machines and
double queries it would mean 17.5M*8 (140M) ICP queries, meaning about
4000 ICP queries per second during peak hours. At some point this
system will no longer work.
 
Trying to balance the caches with something like .com to that cache
and .edu to that cache is too much work for me to maintain.

-- 
     Niilo Neuvo                   >>>^<<<       niilo.neuvo@saunalahti.fi
     Technical Director              /¤\      +358 (0) 50 5611042 (mobile)
     SAUNALAHDEN SERVERI OY          | |         +358 (0) 3 31558042 (fax)
     .¸¸.·´´¯·.¸¸.·´´¯·.¸¸.·´´¯·.¸¸.oOOOo.¸¸.·´´¯·.¸¸.·´´¯·.¸¸.·´´¯·.¸¸.·´
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