Re: Varnish 2.01 - GETs with Grinder end up in PASS

2008-11-04 Thread JT Justman
Robert Ming wrote:
 Hi!
 
 We do load-testing with 'The Grinder' vers. 3.1 on Varnish in front
 of several Plone3 instances. The tests worked out fine with Varnish
 2.0 beta. Now with version 2.01 we have the following issue: 
 Executing any GET with the Testing-Framework results always in a PASS
 in Varnish. As a consequence all subsequent requests with the same
 url end up in cache hits for pass, that's not what we like to test.
 Requesting the same urls manually, say with firefox or ie are first
 LOOKUPed and afterwards cached, the behaviour we would like to test.
 
 Trying different ways to get around this PASSing-issue we came to
 the conclusion that it is not a grinder problem, because a simple GET
 done with the python httplib.HTTPConnection had the same effect.
 
 Any comments, solutions, enlightments on this issue are appreciated.
 

Post your vcl? Have you looked at the logs?

-- 
[EMAIL PROTECTED]
http://www.endpoint.com
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


caching using ETags to vary the content

2008-11-04 Thread Miles
Hi

I am using varnish 2.0-beta-2.

I am using varnish to cache a website where there is a small amount of 
personalised content in a particular directory.  When the user is 
outside of that directory, the only difference for logged-in and 
non-logged-in users is a few links (e.g. login/register or view 
profile/logout - the targets are the same irrespective of which user). 
I am trying to come up with a cache setup to deal with this.

How I had planned to deal with this was as follows:
  - set an ETag (e.g. logged-in or anon) depending on whether the 
user is logged in or not;
  - add a Vary: ETag header, so varnish stores several representations
  - in varnish, set an ETag header on the request when it is received, 
depending on if the user is authenticated or not (can be determined by 
the presence of a cookie).  the request should then match the correct 
page in the cache.

I know varnish doesn't do If-None-Match, but I don't think that is a 
problem in this scheme.

I haven't attempted this yet - can anyone see any holes in it as a 
method?  Or does anyone else have a way of dealing with this sort of 
personalisation-lite?!

Thanks in advance for your help!

Miles

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


varnish in front of load balancer

2008-11-04 Thread Miles
Hi,

Second question - we are running varnish in front of a load balander. 
The load balancer has stickiness - requests go to the same backend 
server each time, unless that server goes down.  The stickiness is 
provided by a cookie which is set on the first request, and then read to 
direct the request to the right backend.

What I want to do is ignore these cookies when trying to decide whether 
the request can be served from the cache or not - but if it can't be 
served from the cache, then pass the cookies on.

I've seen examples on completely ignoring cookies, but not that cover 
this case.

Thanks in advance,

Miles

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Conditional GET (was Re: caching using ETags to vary the content)

2008-11-04 Thread Miles
Ryan Tomayko wrote:
 On 11/4/08 12:51 PM, Miles wrote:
 I know varnish doesn't do If-None-Match, but I don't think that is a
 problem in this scheme.
 
 I'm curious to understand why Varnish doesn't do validation / conditional GET.
 Has If-Modified-Since/If-None-Match support been considered and rejected on
 merit or is it something that could theoretically be accepted into the
 project? Has it just not received any real interest?
 
 Personally, I'd love to see support for conditional GET as this can
 significantly reduce backend resource use when the backend generates cache
 validators upfront and 304's without generating the full response.
 
 Ryan

AFAIK varnish does do if-modified-since, just not if-none-match

Miles

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Frontend caching to multiple sites

2008-11-04 Thread Espen Braastad
Alecs Henry wrote:
 I want to set up varnish as a reverse proxy/cache to multiple customer
 sites.
 As in, I have 10 different customers, each with its own web site (domains)
 with their own necessities, compression, cookie, authentication, etc; each
 customer is a different setup from the other, so I thought OK! Let's use a
 different VCL for each customer and all will be fine.

 Bear with me here, I've just started playing with varnish, but it seems that
 I can't create a different VCL file for each customer and load it in varnish
 (vcl.use ...) as varnish will stop responding for the previous site and
 start responding only to the new one (active configuration). Meaning, the
 content that is served is only the content from the new site, even if using
 the correct domain.

 How can I go about setting this up?
 I'm using Varnish 2.0.1, just downloaded and compiled it today.
   
Hi,

You can try something like this in one VCL:

sub vcl_recv {
  if (req.http.host ~ ^(www\.)site1\.com$){
# foo
  }

  if (req.http.host ~ ^(www\.)site2\.com$){
# bar
  }

  if (req.http.host ~ ^(www\.)site3\.com$){
# baz
  }

  # Unknown host
  error 403;
}

-- 
mvh
Espen Braastad,
+47 21 54 41 37
[EMAIL PROTECTED]
Linpro AS - Ledende på Linux


___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc