How to keep Varnish cached populate after backend down for an extended period?
Posted
by
Nicholas Tolley Cottrell
on Server Fault
See other posts from Server Fault
or by Nicholas Tolley Cottrell
Published on 2012-06-09T09:39:20Z
Indexed on
2012/06/09
10:42 UTC
Read the original article
Hit count: 275
We have Varnish 3.0.2 running on Amazon's Linux and it works great. We have a ttl of 48 hours for most content pages and much longer for images, PDFs etc.
This weekend we've taken the backend down for some maintenance, so I upped the ttl to 5 days earlier in the week. I had assumed that anything in cache would continue to be served for up to 5 days, but much to our disappointment we checked varnishstat
this morning and the cache was almost completely empty and varnish was serving "page not found" messages.
I know that this is not what Varnish is designed to do, but why would it reset its cache when the backend is down? And how can I prevent it for next time?
© Server Fault or respective owner