We are using haproxy for loadbalancing across several machines. Our application includes a number of services, each deployed as an independent war in tomcat, that can be requested. Currently I have a single backend that get's loadbalanced to, which means if any one server starts returning errors the entire box will be considered 'bad' and removed from the load balancer.
so for example if box A were to start throwing bad responses when someone makes requests to https://myAwsomeApp/foo/ Then box A would be removed entirely from the load balancer, meaning that a request to https://myAwsomeApp/bar/ would never get routed to box A, even if that separate service was functional and could still support requests to it.
I want to change this so that each of the services are independent, so that even if the foo app goes down on box A then request to /bar will still be routed to A.
I know I could do this using ACl to cause requests to https://myAwsomeApp/foo to go to a difference backend then request to https://myAwsomeApp/bar; but that seems a little silly since the two backends would have the exact same hosts in them.
I also want a quick way to take an entire box down at once for when we deploy new code or have issues at specific sites, and having to modify 10 backends (one for each service the box supports) seems annoying and prone to errors where one backend is missed.
So is there a cleaner way to have my cake and eat it to? To allow haproxy to disable only services that are proven to be bad, but also make it easy to turn off all services on a box in one go.