How to check if Tomcat Web Application is running and redirect to another server if there is an error from Apache 2.2?

5,847

Basically what you seem to want is a method of health checking on the application level. mod_jk only does TCP level checks AFAIK. If you want to use a more intelligent form of load balancing, you may be better off using something like HAProxy, which can monitor specific URLs inside your application based on which it will decide if the checked node is healthy. Hardware load balancers such as F5's BigIP also offer a wide range of configurable health checks, but they are relatively expensive.

Share:
5,847

Related videos on Youtube

ZXingIT
Author by

ZXingIT

Newbie in Android development. Please guide me along!

Updated on September 18, 2022

Comments

  • ZXingIT
    ZXingIT over 1 year

    I have machine A running Apache 2.2 (acting as load balancer) and 2 machines(B & C) both running Tomcat and Java Web Application on Windows 7 in a network. Is there any way I can check:

    1. If the Web application is down but the Tomcat is still running on Machine B and redirect the request to Machine C

    Does this has to do with modifying the Tomcat or Apache 2.2 config? Thanks.

    • objectified
      objectified about 12 years
      What is the configuration that you use inside the Apache server that acts as a load balancer? Are you using a specific module for load balancing?