How to create a hot standby node when using mod_proxy

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Server (EAP)
  • JBoss Enterprise Web Server (EWS)
  • Red Hat Enterprise Linux (RHEL)
  • Apache httpd

Issue

  • We are planning to use the EWS as a loadbalancer in front  of some JBoss servers and Tomcat servers. If we need to have a server on hot standby mode, how do we go about this ? We currently have the following config:

      <Proxy balancer://mycluster>
           Order deny,allow
           Allow from all
    
           BalancerMember https://host1:443/app1 route=node1
           BalancerMember https://host2:443/app1 route=node2
         </Proxy>
    
         ProxyPass /app1 balancer://mycluster/app1
         ProxyPassReverse /app1  https://host1:443/app1
         ProxyPassReverse /app1  https://host2:443/app1
    

Resolution

If host2 is going to be on hot standby, then the new config should look like this:

<Proxy balancer://mycluster>
       Order deny,allow
       Allow from all

       BalancerMember https://host1:443/app1 route=node1 
       BalancerMember https://host2:443/app1 route=node2 status=+H
     </Proxy>

     ProxyPass /app1 balancer://mycluster/app1
     ProxyPassReverse /app1  https://host1:443/app1
     ProxyPassReverse /app1  https://host2:443/app1

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.