hash algorithms...
Anders Berg
andersb at vgnett.no
Mon Apr 10 23:46:26 CEST 2006
>
> Anders: the is mostly nörd talk, don't despair :-)
I'm cool :)
> One thing struck me, and that is that ideally we would need to hash
> more than just the URL. A given document could exist in different
> languages or formats, selected by HTTP header, rather than by URL.
> For now that is going to be an item in the "notes". One way to
> handle it later on is with a VCL function doing the lookup, and the
> lookup command in VCL taking arguments of some kind.
Yes, you are right. To implement support for gzip'ed files we need more
than the URL, probably URL, Content-Encoding and User-Agent.
Potentially that means many different versions of each file, and will
probably be a hassle to work with in VCL. The reason I threw in User-Agent
are clients that don't behave according to RFC 2616. I am told that they
exist. This really makes it hard to implement support for gzip'ed files
without a performance dent, and it could also render Varnish less useful,
with many browsers having exotic names:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ABS)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SP/6.36/1.01/HP; .NET
CLR 1.1.4322)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts;
.NET CLR 1.1.4322)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.1)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Dialer/1.10/ADSL;
.NET CLR 1.1.4322)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322;
.NET CLR 1.0.3705; InfoPath.1)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SIMBAR Enabled;
.NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
(I am not making this up. This is a _extract_ from a logg file over 5 min.)
So to find a good solution to this problem we need to digg deep (do all
the MSIE 6.0 behave alike? etc.).
But I guess thats for later. Be sure to tell me if you need logs. I have
loads of them.
Just my thoughts about "hashing" :)
Anders Berg
More information about the varnish-dev
mailing list