In mod_cluster how do we configure hot-standby nodes?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x
  • mod_cluster

Issue

  • How can we achieve a hot-standby configuration with mod_cluster?

Resolution

  • With EAP 6.3.0+, it is now possible to have this behavior by statically defining one node to have a load of 0. In this scenario the node will only be selected in the following cases:

    1 - The node is changed to a normal node (factor > 0)
    2 - All the other nodes are in error or have been removed

  • An example of this configuration is below:

<subsystem xmlns="urn:jboss:domain:modcluster:1.1">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp">
              <simple-load-provider factor="0"/>
          </mod-cluster-config>
</subsystem>
  • If you have multiple stand by nodes, all requests will route to the stand by node that first joined the balancer if all other regular nodes are unavailable. Then if that node goes down, requests will route to the second stand by node that joined the balancer. So stand by nodes are used one at a time in the order that they joined the balancer.
  • New sessions will route back to the normal nodes when they are available again. Requests stickied to the standby node will continue to route to the standby node.

Root Cause

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.

Comments