Using UDP, How to setup mod_cluster for standalone nodes which provide different service?

Solution In Progress - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • Red Hat JBoss Enterprise Web Server (EWS)
    • Apache httpd
    • mod_cluster 1.2.x

Issue

  • Using UDP, How to setup mod_cluster for standalone nodes which provide different service?

Resolution

UDP - Multicast

1.Architecture

alt text

2.Cluster Multicast IP

alt text


3.Apache Server Configuration

  • 3.1. conf.d/mod_cluster.conf:
<IfModule manager_module>
  Listen 6666
  <VirtualHost *:6666>
    ServerAdvertise on
    EnableMCPMReceive
    <Location /mod_cluster_manager>
      SetHandler mod_cluster-manager
      Order deny,allow
      Deny from all
      Allow from all
   </Location>
  </VirtualHost>
</IfModule>
  • 3.2.conf/httpd.conf:
Listen 81
Listen 82

<VirtualHost *:81>
ProxyPass / balancer://webserver1/
</VirtualHost>

<VirtualHost *:82>
ProxyPass / balancer://webserver2/
</VirtualHost>

4.JBoss EAP 6.2

  • 4.1.ts2,ts3 in cluster1 standalone-ha.xml:
        <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
            <mod-cluster-config balancer="webserver1" advertise-socket="modcluster" connector="ajp" >
                <dynamic-load-provider>
                    <load-metric type="busyness"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
  • 4.2.ts4 in cluster2 standalone-ha.xml:
        <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
            <mod-cluster-config balancer="webserver2" advertise-socket="modcluster" connector="ajp" >
                <dynamic-load-provider>
                    <load-metric type="busyness"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>

5.Start Script:

  • 5.1.ts2 in cluster1 ... node1 (x.x.x.134)
  ./bin/standalone.sh -c=standalone-ha.xml -Djboss.bind.address.management=x.x.x.134 -Djboss.bind.address=x.x.x.134  -Djboss.node.name=ts2
  • 5.2.ts3 in cluster1... node2 (x.x.x.228)
  ./bin/standalone.sh -c=standalone-ha.xml -Djboss.bind.address.management=x.x.x.228 -Djboss.bind.address=x.x.x.228  -Djboss.node.name=ts3
  • 5.3.ts4 in cluster2 ... node3 (x.x.x.134)
  ./bin/standalone.sh -c=standalone-ha.xml -Djboss.bind.address.management=x.x.x.134 -Djboss.bind.address=x.x.x.134  -Djboss.node.name=ts4 -Djboss.socket.binding.port-offset=100 -Djboss.default.multicast.address=230.1.0.20 -Djboss.messaging.group.address=231.7.0.10

Attachments

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.