Possible to cache a page for grace mode despite a TTL of 0?

Victor Cheng victor.cheng at paperg.com
Tue Jun 5 02:17:50 CEST 2012


I'm not sure if this improper usage of Varnish or not, but I'd like to do
the following for high availability purposes:

I have a page that's dynamic in nature, but I want to be able to serve a
cached copy of it if the backend servers happen to go down.

Is it possible to do this while setting the beresp.ttl to 0? This seems to
prevent grace mode and works fine if I set it to 1 (as well as if I set the
relevant grace mode params), but showing people a cached page for even one
second won't work right now because each load should save new data to a
database. If the backend servers go down, it's okay if we aren't able to
save the data -- we want to at least be able to display a cached copy of
the page.

That said, perhaps Varnish isn't meant for this -- any suggestions?

Thanks!
-Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120604/0e88b1f2/attachment.html>


More information about the varnish-misc mailing list