deliver graced content instead of waiting for backend response

Ereboos ereboos at googlemail.com
Fri Jun 18 12:59:37 CEST 2010


Hello,

In our setup we have some web content that takes a longer time to be 
built (around 10seconds).
We have set up a varnish cache to cache this request for 20 seconds.

But we dont want our users who access this service after the 20 seconds 
to wait for 10 seconds after the backend
has finished. Instead we would like a old document to be delivered and 
the cache to be updated (if age is still under 40 seconds)

So I setup a grace time of 20 seconds. But unfortunately the first 
request coming after the 20 seconds of ttl is delayed for the 10 seconds of
generation time. all other requests which follow immediatelly will 
receive the old content (grace).

How can I achieve that the first request will also receive old content 
and varnish internally updates his cache then?

thank you in advance,
Markus




More information about the varnish-misc mailing list