On 14 Jul 2011, at 14:08, Chris Davies wrote:
> On Jul 14, 2011, at 9:05 AM, Shibashish wrote:
>> On Thu, Jul 14, 2011 at 6:30 PM, Chris Davies <[email protected]> wrote:
>> I've got a director set up with three nodes, and I can see how to check the
>> health of the director, but, is there any method to check the health of a
>> particular backend in the director?
>>
>> Each backend host is checked with its own probe...
>>
>> .probe = {
>> .url = "/probe.cgi";
>> .timeout = 34 ms;
>> .interval = 1s;
>> .window = 10;
>> .threshold = 8;
>> }
>>
>> More at https://www.varnish-cache.org/trac/wiki/BackendPolling
>
> And in VCL, how do I tell the health of the backend within a director?
> _______________________________________________
> varnish-misc mailing list
> [email protected]
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
You could set a header based on and then issue a restart then act on the header
in vcl_recv.
This example restarts to choose a new backend
https://www.varnish-cache.org/trac/wiki/VCLExampleRestarts
And I've previously done stuff like
if (req.backend.healthy) {
set req.grace = 60s;
}
else {
set req.grace = 12h;
}
so you could combine to two to push some logic through
Stew_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc