The documentation for the Varnish 4 saint mode module indicates that when the threshold of blacklisted objects is reached, the server will be marked as unhealthy. I set up a configuration with a single backend and a threshold of 0 (also tried 1):

    new saint1 = saintmode.saintmode(server1, 0);
    new vdir = directors.round_robin();

I also have logic for handling unhealthy backends:

    if (!std.healthy(req.backend_hint)) {
            if (obj.ttl + obj.grace > 0s) {
                    return (deliver);
    } else {
            if (obj.ttl + 30s > 0s) {
                    return (deliver);

When I have a page with an error it appears to use the logic for a healthy backend. It will show the page for 30s after expiry and no more. Shouldn't the saint more mark the backend as unhealthy so it uses a longer time?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.