Configuration to avoid dog-pile when cache is empty

Cosimo Streppone cosimo at streppone.it
Sat Jun 5 13:52:37 CEST 2010


On Sat, 05 Jun 2010 09:18:08 +0200, Per Buer <perbu at varnish-software.com>  
wrote:

> On Fri, Jun 4, 2010 at 2:34 PM, Evgeniy Dolzhenko <dolzenko at gmail.com>  
> 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




More information about the varnish-misc mailing list