<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 14 Jul 2011, at 14:08, Chris Davies wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Jul 14, 2011, at 9:05 AM, Shibashish wrote:<br><blockquote type="cite">On Thu, Jul 14, 2011 at 6:30 PM, Chris Davies <<a href="mailto:isp@daviesinc.com">isp@daviesinc.com</a>> wrote:<br></blockquote><blockquote type="cite">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?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Each backend host is checked with its own probe...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">.probe = { <br></blockquote><blockquote type="cite">                .url = "/probe.cgi";<br></blockquote><blockquote type="cite">                .timeout = 34 ms; <br></blockquote><blockquote type="cite">                .interval = 1s; <br></blockquote><blockquote type="cite">                .window = 10;<br></blockquote><blockquote type="cite">                .threshold = 8;<br></blockquote><blockquote type="cite">        }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">More at <a href="https://www.varnish-cache.org/trac/wiki/BackendPolling">https://www.varnish-cache.org/trac/wiki/BackendPolling</a><br></blockquote><br>And in VCL, how do I tell the health of the backend within a director?<br>_______________________________________________<br>varnish-misc mailing list<br><a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br></div></blockquote></div><br><div>You could set a header based on and then issue a restart then act on the header in vcl_recv.</div><div><br></div><div>This example restarts to choose a new backend  <a href="https://www.varnish-cache.org/trac/wiki/VCLExampleRestarts">https://www.varnish-cache.org/trac/wiki/VCLExampleRestarts</a></div><div><br></div><div>And I've previously done stuff like </div><div><br></div><div><meta charset="utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; font-size: 13px; ">  if (req.backend.healthy) {<br><br>         set req.grace = 60s;<br><br>       }<br><br>       else {<br><br>         set req.grace = 12h;<br><br>       }</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; font-size: 13px; ">so you could combine to two to push some logic through</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; font-size: 13px; ">Stew</span></div></body></html>