Understanding persistent storage

Per Buer perbu at varnish-software.com
Wed Apr 20 19:21:53 CEST 2011

On Tue, Apr 19, 2011 at 6:44 PM, Yang Zhang <yanghatespam at gmail.com> wrote:
> What I found last time was:
> (1) Fetch a page. Miss first time, hit subsequent times.
> (2) Restart Varnish.
> (3) Fetch same page. Miss.

Right. This is actually valid behavior. The goal of the persistent
storage isn't to salvage _all_ of the data across a restart, only to
salvage _most_ of the data. Salvaging all of the data would require
database type storage semantics which is more or less impossible to
achieve without scarifying a lot of persistence.

As -spersistent is implemented, the storage silo which is open at the
time of the crash/restart is discarded completely, so most of the
objects inserted into the cache the last few seconds before the crash
will  certainly be lost. Remember, we're a cache, not a data store.

Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
Varnish makes websites fly!
Whitepapers | Video | Twitter

More information about the varnish-misc mailing list