I have pretty sophisticated varnish config. I can't really use the directors and doing the routes manually.
//webservice1 and webservice2 has probes working there
set req.backend = webservice1;
if (req.backend.healthy)
{
#redirect there
}
set req.backend = webservice2;
if(req.backend.healthy)
{
#change parameters with regex and redirect
}
This works. But looks really lame.
Is there any "legal" way to find out if backend is healthy? Like this:
if(webservice2.healthy)
{
#change parameters with regex and redirect
}
This is not working, obviously.