Problem with varnish and caching
andersb at vgnett.no
Sun Jul 1 16:07:04 CEST 2007
> Message: 1
> Date: Sat, 30 Jun 2007 19:10:16 -0500
> From: "Manuel Amador (Rudd-O)" <rudd-o at rudd-o.com>
> Subject: Re: Problem with varnish and caching
> To: Dag-Erling Sm?rgrav <des at linpro.no>
> Cc: varnish-misc at projects.linpro.no
> Message-ID: <1183248616.3955.7.camel at gabriela>
> Content-Type: text/plain; charset="utf-8"
> Whether this is part of a different specification or not, it's
> unreasonable for Varnish to NOT cache static, cacheable objects by
> default, solely because these requests were sent along with Cookies.
I am not aware of any HTTP accelerator that would caching this by
default. Since I believe it is a direct violation of all standards.
Think of it this way: Why cache pages that are said to be dynamic by the
Squid and Bluecoats will not cache these pages, and the mechanism(s) to
tune that are far from fine grained.
> In effect, the default Varnish policy of not caching Cookied requests
> causes Varnish not to cache anything at all for most sites (you know,
> there are tons of people out there using Google Analytics). Think about
> it: why would people want the overhead of a non-caching accelerating
Here you assume "most sites" use Google Analytics. I am not so sure
about that. Either way, while Varnish will suite almost any site you can
imagine, it's strengths will be most appreciated by "larger" sites. With
larger sites I mean sites that would not dream of using Google Analytics.
> On s?b, 2007-06-30 at 23:41 +0200, Dag-Erling Sm?rgrav wrote:
>> [moved from -dev to -misc]
>> "Manuel Amador (Rudd-O)" <rudd-o at rudd-o.com> writes:
>>> As you might already have noted, I reported a bug on varnish caching
>>> files indiscriminately.
>> This is not a bug, it is a misunderstanding. It appears you expect
>> Varnish to act like an RFC 2616 "shared cache" whereas it is in fact a
>> "surrogate" (see the "Edge Architecture Specification" by Oracle and
>> Akamai, although Varnish does not yet fully implement that specification
>>> My page sets a few cookies. That'd be okay and it should produce
>>> dynamic pages, which Varnish is furnishing through my backend. The
>>> thing is, these cookies are sent along requests for CSS and PNG and JPG
>>> and JS files, which causes varnish to contact the backend. I don't want
>>> that to happen (I'm happy with them being cached by Varnish 120
>>> How can I tell Varnish that requests with a response that includes ETag
>>> (a discriminant for static files) should be forcibly cached?
>> This is basically the same issue as in your previous email, and the
>> answer is the same.
> Manuel Amador (Rudd-O) <rudd-o at rudd-o.com>
> The R Zone - http://rudd-o.com/
> GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/
> Now playing, courtesy of Amarok:
> Small things make base men proud.
> -- William Shakespeare, "Henry VI"
More information about the varnish-misc