Re: [squid-users] flat file parsing vs db filter rules parsing

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 25 Oct 2004 19:21:56 +0200 (CEST)

On Mon, 25 Oct 2004, Muthukumar wrote:

>> Regex patterns does not allow for an efficient lookup. All regex based ACLs will by definition use a linear list where lookup time
>> is linear to the number of entries in the acl. This applies to both Squid and SquidGuard.
>
> So Filter rules lookup are linearly based on pattern rule entries count.

In regex based acls yes, as there is no structure in regex patterns which
can be utilized to perform a more efficient lookup.

> I had a lookup on splay tree concepts. But I tried to know about squidguard but squidguard domain is not reachable?

I can not answer for what happens with SquidGuard, only Squid.

> We are having a objective as To make a filter with DB based configuration informations.
> It has to reach efficient performace with adaptation with squid. We are on the analysis TODO this.

There is one important ACL type missing from Squid and it is a "URL
lookup". SquidGuard has a quite efficient such acl.

And as already mentioned, none of the acl types implemented in Squid is
using a DB as backend storage, only plain files. But there is no technical
reason why a DB can not be used other than that it is not done in Squid.

> Do we have to follow any RFC format to make a filter with DB based one?

RFCs only care about what is going on in the HTTP protocol, not how a
proxy or whatever determines it's access controls. So no, you are free to
do pretty much anything you like.

If you are doing this inside Squid then whatever you do should fulfill the
non-blocking property. You do not want Squid to stop processing requests
only because it is waiting for an response from the DB system.

Regards
Henrik
Received on Mon Oct 25 2004 - 11:21:59 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Nov 01 2004 - 12:00:02 MST