Ok, actually I found this behavior surprising since I was thinking of every request being processed in complete isolation, but here is the FAQ entry which indirectly documents the feature I believe
http://varnish-cache.org/wiki/FAQ#WhyamIgettingacachehitbutarequestisstillgoingtomybackend On Sat, Jun 5, 2010 at 3:52 PM, Cosimo Streppone <[email protected]> wrote: > On Sat, 05 Jun 2010 09:18:08 +0200, Per Buer <[email protected]> > wrote: > >> On Fri, Jun 4, 2010 at 2:34 PM, Evgeniy Dolzhenko <[email protected]> >> wrote: > >>> Now what I would like ideally to achieve with Varnish is that only >>> first request hits Application Server and every other request is >>> "joined" to that request, i.e. will be served as soon as >>> Application Server responds to the first request and with >>> the content of the response. I.e. Varnish will have to hold >>> the connections open and then use response cached by first request >>> >>> Is that possible? Or is it just a too crazy thing to do? >> >> No. It's quite sensible. It's also the default. :-) > > That sounds surprising to me. Can you explain? > Say that I restart varnish. > Then 10 clients hit the "/takes_long_time_to_load.html" page at > the same time. > > What I understand from your reply is that varnish will hold the > 9 remaining connections until the first one sees the backend > reply. At that point, the 9 remaining clients will get served > the cached object. > > Is that really how it works? > I'm specifically referring to the first time after restart, > so grace doesn't apply here. > > -- > Cosimo > > _______________________________________________ > varnish-misc mailing list > [email protected] > http://lists.varnish-cache.org/mailman/listinfo/varnish-misc > _______________________________________________ varnish-misc mailing list [email protected] http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
