Objects in grace while backend is down

Javier Frias jfrias at gmail.com
Tue Mar 10 02:53:05 CET 2009


I'm trying to accomplish having varnish always return a cached object by
having a large grace period, and have set:

in sub vcl_recv

set req.grace = 600m;

and

sub vcl_fetch {
        set obj.grace = 600m;
        if (obj.ttl < 600s) {
                set obj.ttl = 600s;
        }
}


Grace just doesn't seem to work when the backend is down... within the ttl,
the object gets returned when the backend is down, but as soon as the ttl is
over it, it gives me a 503  Service unavailable, even though the grace is of
10hours.

Is there a way to server objects out of grace when the backend is down?


-Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20090309/0aa1784a/attachment-0001.html>


More information about the varnish-dev mailing list