Varnish 4.1 : std.healthy and saint mode

Arnall arnall2009 at gmail.com
Wed Jul 13 15:52:47 CEST 2016


Hello everyone,

do you know if there's a way to make std.healthy(req.backend_hint) work 
with saint mode ?
Actually it returns true even if the backend is blacklisted by saint 
mode for a particular request.
So i can't make a difference in vcl_hit :

if (std.healthy(req.backend_hint)) {
     if (obj.ttl + obj.grace > 0s) {
     #stale-while-revalidate
          return (deliver);
     }
}
else {
     if (obj.ttl + obj.grace + obj.keep > 0s) {
     #stale-if-error
         return (deliver);
     }
}

to simulate stale-while-revalidate and stale-if-error.
(works well if the backend is really down)
Thanks.




More information about the varnish-misc mailing list