Re: Vary implementation

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 4 May 2004 22:02:09 +0200 (CEST)

On Tue, 4 May 2004, Mati wrote:

> As we proceed with our ETag/Vary project we have come up with a project
> of adding ETags to Vary support in squid3.

Excellent!

> The project can be found at:
> http://rainbow.mimuw.edu.pl/~ms189442/mmsquid/mmsquid.php?menu[0]=presentations&menu[1]=vary&menu[2]=project20040426
>
> This is how we would implement it if we were to do it from scratch.

I'll make sure to read this and give you feedback some time in the next
few days.

> However, we know that these features are included in squid 2.5's etag patch.

Probably, but don't take the 2.5 etag patch too seriously. It is a first
generation attempt of adding ETag support, with one goal to make least
intrusive changes..

> A client requests for a variant that isn't cached.
> Squid forwards the request with If-None-Match containing etags of all
> cached variants.
> Suppose the server responds with 304 Not Modified and one of cached etags...
>
> How the patch decides which store entry to pass to the client?

IIRC the 2.5 ETag patch keys the variants by their URL + ETag, and in the
ETag index there is only a map of request headers -> ETag (and StoreKey).

The format of this map is documented here:

http://devel.squid-cache.org/etag/storeformat.html

but it is just a suggestion.

Actually it is redundant to have the StoreKey in there. It should be
possible to reconstruct the StoreKey from the URL and ETag.

The basic problem one needs to address is how to index multiple variants
on a single URL.

URL -> Vary header data -> Object (ETag or unique if no ETag)

in case of ETag there can be many different Vary header data references to
the same object. If no ETag then each Vary header data reference is
unique.

> Ok, so to sum up: We are ready to implement full Vary/ETag support, but
> we're not sure if we have thought of all the possibilities, flows,
> situations, etc. And if the patch deals with everything better than our
> project, we will employ the patch's idea. So, we are asking for an
> advice.

I am more than happy to help with advises on how different aspects of ETag
or Vary can be approached within Squid. I do not think you should look too
closely at the implementation of the Squid-2.5 patch.

Regards
Henrik
Received on Tue May 04 2004 - 14:02:13 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 31 2004 - 12:00:02 MDT