JBoss EAP 6 uses JGroups to handle cluster communication. JGroups is a full fledged communication API and you can read more about it here, http://www.jgroups.org/manual-3.x/html/index.html.
Default is JBoss EAP 6 configured to use UDP, but in this blog I will show you how to configure JBoss EAP 6 HA cluster to use TCP multicast networking instead.
JGroups is flexible API, that can stack several protocol on top of each other, or chain them if you like. The JGroups protocol can be divided into the following:
- Group Membership: pbcast.GMS, PING, TCPPING, MPING, TCPGOSSIP, FILE_PING, JDBC_PING
- Failure: MERGE2, FD, FD_ALL, FD_SOCK, VERIFY_SUSPECT
- Reliable transmission: pbcast.NAKACK, UNICAST, RSVP
- State transfer: pbcast.STATE_TRANSFER, pbcast.STATE, BARRIER
- Efficiency: FRAG2, COMPRESS, UFC, MFC, DAISYCHAIN
- Various: ENCRYPT, AUTH, SEQUENCER, STABLE, RELAY
Now revisit our cluster domain example that I have previously described here http://magnus-k-karlsson.blogspot.se/2013/01/how-to-cluster-domain-jboss-eap-6-and.html. But now lets change the global configuration in ./domain/domain/configuration/domain.xml.
Now if you have already started the cluster you need to restart the Domain Controller and then log into the domain controller with you CLI tool and restart each cluster node.
Watch each cluser server node log for error, if any revisit the above and sort out problems. If everything OK, you should see something similar on server1.
And host server2.
Now in the JBoss EAP 6 Administration and Configuration Guide there is suggested to turn off the ServerAdvertise in the Apache Web Server mod_cluster, we do that and restart everything. After restart make sure that mod_cluster is up and running, by checking every cluster node is registered in the http://127.0.0.1:6666/mod_cluster_manager.
Now you can test the clustered application by open http://127.0.0.1/cluster/index.jsf.