manually refreshing varnish cache

Kevin k at kevinkevin.com
Thu Sep 22 07:33:16 CEST 2011


Hello Mattias,

Doesn't varnishreplay work by reading the live log of transactions and
reproducing them as such? How would this work on a standby / "cold" varnish
server that is not actively generating said log files?

Thanks


-----Original Message-----
From: Mattias Geniar [mailto:mattias at nucleus.be] 
Sent: Sunday, August 14, 2011 7:29 AM
To: Kevin; varnish-misc at varnish-cache.org
Subject: RE: manually refreshing varnish cache

> The challenge (not really a hard one mind you) would be to regularly
update the 
> cache in said standby varnish server at scheduled intervals so that
the stale cache 
> is not so far out of date when / if I do need to flip that DNS switch.
> If anyone has dealt with this scenario specifically ,or just with
crawling varnish in 
> general, I'd like to hear anyone's thoughts!

Hi Kevin,

You may want to look into the "varnishreplay" command:
https://www.varnish-cache.org/docs/2.1/reference/varnishreplay.html
You could restart your Varnish on the standby side, run varnishreplay to
cache all the URLs you want with a TTL of > 1 day to keep it in cache.

Regards,
Mattias






More information about the varnish-misc mailing list