Using req/obj.grace to serve stale objects when backend fails
Anders Nordby
anders at fupp.net
Wed Nov 12 21:19:48 CET 2008
Hi,
On Thu, Nov 06, 2008 at 06:05:46PM -0800, Jeff Anderson wrote:
> I've experimented with req/obj.grace set to a few hours so a site can
> be served even if the backend fails. For example, with the backend
> down and when req/obj.grace is set to several hours I can open a new
> browser and get a 503 if I try to open a known cached (and graced)
> page. However if I refresh the same browser several times very
> rapidly I finally receive the graced page. It seems to be working as
> expected from what I read in the documentation regarding the graced
> object being served while the same object is being fetched by another
> thread. The rapid refreshing is generating a second thread request
> which then satisifies the requirements to have the graced object
> served. Is there a way to configure varnish to serve the cached
> graced object if the backend fails without the browser ever seeing the
> 503? Can this also be tied into the backend probing/polling?
It's not possible yet, but wanted. See ticket
http://varnish.projects.linpro.no/ticket/369. You may also have an
interest for http://varnish.projects.linpro.no/wiki/VCLExampleRestarts.
Cheers,
--
Anders.
More information about the varnish-misc
mailing list