I am using nginx (free version on centos) as a reverse proxying load balancer to a cluster of Tomcat 7 servers. It works great except for the time when tomcat is starting.

If a Tomcat instance is shut down, it fails over to another correctly. But if Tomcat is starting up - which can take 60 sec - it sends the requests to tomcat but tomcat does not respond. So the user gets the nginx error page.

Is there any way for the upstream load balancer to make sure tomcat is responding?


  • I have the same issue with apache mod_proxy_balancer, any help would be appreciated. – rodvlopes Jan 25 '16 at 18:42

Yes, in most proper load balances you can (and should) configure a more advanced check to determine the status of a back-end server than a simple TCap/IP connect.

Create a simple, trivial jsp servlet and configure the load lancer to retrieve that. No tomcat and an error code or failure will result, but when Tomcat is alive a nice HTTP 200 should be returned.

| improve this answer | |
  • Yes. I have that for external monitoring sites. But for the open source version of nginx, I can't figure out how to query it. – PrecisionPete Jul 12 '14 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.