Hi guys,
Having read over the list archives, I see that multiple ICAP services is
currently not supported. As with a couple of others on the squid-users list,
I've a requirement for chaining services - hence a request is passed through
two (or more) AV scanners before being cached and passed onto the client
browser.
Given that (as per Alex's comments) it doesn't look like this is a priority for
the dev team, I'm willing to have a go at coming up with a patch to support
this functionality. Having spent a couple of hours looking over the squid3
code, I think I've got my head around how it all works. Can somebody indicate
whether I'm on the right lines here:
As far as I can see, all ICAP transactions themselves (once we have indentified
a suitable service from the candidates in squid.conf) are fired as asynchronous
events. Events are then fired in the order they are pushed onto the events
list, with a callback being executed at the respective time.
So, as I understand it, adding multiple ICAP services is simply a matter of
adding several events onto the events list one after another, each having a
respective argument for the desired service. These will then be processed in
order, each adapting the request / response (or leaving it untouched).
Obviously there's some rejigging of the config side of things to do. The
findBestService code that currently returns a single ('Best') service item
would need to return a list of matching services, as far as a I see, each of
which would have its own event, which then runs the callback functions which
then perform the necessary ICAP transactions. Once all of the ICAP services
have had their chance to meddle with the data, it is then returned to the core
to continue to its final destination.
Have I understood this all correctly or is there some massive amount of work
involved that I've missed?
I've also found a post on the list archives, from Alex, commenting on multiple
ICAP services with regards to load balancing and chaining. The post is dated
Oct. 2006. Are these points still valid? Is it something else to bear in mind
here? The post in question is here:
http://marc.info/?l=squid-dev&m=116181976000760&w=2
Thanks
Richard
P.S. You're obviously making very good progress with bug-fixes in Squid3. The
CVS version I have (PRE7-20070918) is a lot more stable than a version I was
experimenting with a couple of months back. Any ideas when Squid3 might be
considered stable?