Detecting health of Backend in Director in VCL
Chris Davies
isp at daviesinc.com
Fri Jul 15 13:37:18 CEST 2011
On Jul 15, 2011, at 2:02 AM, Tollef Fog Heen wrote:
> ]] Chris Davies
>
> | And in VCL, how do I tell the health of the backend within a director?
>
> something like:
>
> backend foo {
> …
> }
>
> director rr round-robin {
> { .backend = foo; }
> …
> }
>
> sub vcl_recv {
> set req.backend = foo;
> if (!req.backend.healthy) {
> # Handle this
> }
> set req.backend = rr;
> }
that is sort of what I started to figure out - Just seemed odd to have to set the backend, test, set the next backend.
Thank you for the pointer in the right direction.
More information about the varnish-misc
mailing list