tags:

views:

345

answers:

1

We have some independent servers, connected behind a hardware balancer. Each one of the machines is running Apache 2.2, Tomcat 5.0 and mod_proxy_ajp as the connector.

Everything works fine, but when Tomcat is shutdown, Apache returns error code 503 (as it's expected to do, I guess). The problem is our load balancer, which doesn't interpret error codes. It just thinks "oh, server at machine X has answered -503 blah blah blah, whatever- to my request, it seems to be working, let's keep sending people to that server".

Is there any way to tell Apache not to return anything in this case, instead of the 503 error?

A: 

It is not possible. Your request balancer sucks. Replace it.

Also, 'three tier' doesn't mean "balancer, apache and tomcat on top of it". Balancer should talk to tomcat directly, and let apache to serve the static content from a separate domain/server. This would also solve your problem immediately.

Also: belongs to serverfault!

alamar
harsh. but true. the balancer is in the wrong, not apache.
nategood
Yes, I know, it sucks. I wish we could replace it... but we can't. Direct communication between balancer and Tomcat should solve it, we will try it. Thanks!
AJPerez
@nategood: I know it's not Apache's fault, it's the balancer. But maybe Apache could solve it anyway :), if it was possible to disable the error response.
AJPerez