Hi Mohan,

here is how we do it. We have also a couple of varnishes sitting in front of several backend servers. Each backend server responds to a simple http request on URL http://1.2.3.4/ping (1.2.3.4 being the backend server IP). We use this to check the backend server health in our VCL (in the probe statement). We also use this URL however to check the health of the varnish servers too. We just configured our load balancer to access the varnish URL (http://5.6.7.8/ping, 5.6.7.8 being the varnish IP address) and check it's http status code.

Now, the load balancer will stop sending traffic to the varnish server either when it is down itself or when all it's backends are down, which is essentially the same thing, because it means the varnish cannot serve traffic. We are using restart in the VCL to make sure that single backend failure will not trigger this. If one backend goes down, the ping request is served by different live backend.

Does it make sense?

Michal

Dne 15.9.2010 15:25, Mohan Rao napsal(a):
Hi,
Is there a way to probe a varnish server to see if it is alive ? We have a couple of varnish servers that are load balanced. We would like the load balancer to stop sending traffic to a particular varnish server if we are updating that server. Is there a recommended way to do this ?
Thanks & Regards,
Mohan


_______________________________________________
varnish-misc mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc

--
Michal Táborský
chief systems architect
Netretail Holding, B.V.
http://www.nrholding.com

_______________________________________________
varnish-misc mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc

Reply via email to