Varnish still 503ing after adding grace to VCL

Drew Smathers drew.smathers at gmail.com
Tue Mar 8 21:34:48 CET 2011


On Mon, Mar 7, 2011 at 5:52 PM, Drew Smathers <drew.smathers at gmail.com> wrote:
> On Mon, Mar 7, 2011 at 5:39 PM, Per Buer <perbu at varnish-software.com> wrote:
[snip]
>>
>> That's "Saint Mode" - please
>> see http://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html#saint-mode
>> I see that there isn't too much details on the semantics there. I'll see if
>> I can add some details.
>
> Hi Per,
>
> I actually tried using saintmode for this problem but one point that I
> found tricky is that saintmode (as far as i can tell from docs) can
> only be set on beresp. If the backend is up, that's great because I
> can check a non-200 status in vcl_fetch() and set. But in the case of
> all backends being down, vcl_fetch() doesn't even get invoked and
> there isn't any other routine and object in the routine's execution
> context (that I know of) where I can set saintmode and restart.
>

Sorry to bump my own thread, but does anyone know of a way to set
saintmode if a backend is down, vs. up and misbehaving (returning 500,
etc)?

Also, I added a backend probe and this indeed caused grace to kick in
once the probe determined the backend as sick.I think the docs should
be clarified if this isn't a bug (grace not working without probe):
http://www.varnish-cache.org/docs/2.1/tutorial/handling_misbehaving_servers.html#tutorial-handling-misbehaving-servers

Finally it's somewhat disconcerting that in the interim between a
cache expiry and before varnish determines a backend as down (sick) it
will 503 - so this could affect many clients during that window.
Ideally, I'd like to successfully service requests if there's an
object in the cache - period - but I guess this isn't possible now
with varnish?

Thanks,
-Drew




More information about the varnish-misc mailing list