When WSO2 products are deployed in a clustered mode on Amazon EC2 instances, it is recommended to use the AWS clustering mode. As a best practice, it is recommended to add all nodes in a single cluster to the same AWS security group.
To enable AWS clustering mode, you must edit the clustering section in the
<PRODUCT_HOME>/repository/conf/axis2/axis2.xml file. When enabling AWS clustering mode, it is imperative that you do the steps in this topic, in addition to the steps you follow in the Setting up a Cluster topic for other configuration files.
<PRODUCT_HOME>/repository/conf/axis2/axis2.xml file and do the following changes.
- Enable clustering for this server.
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
- Set the membership scheme to
awsto enable the AWS registration method.
- Specify the port used to communicate cluster messages. This must be any port number between 5701 and 5800.
Define the following AWS specific configurations. These are the AWS access key, secret key, security group, region, tag key and tag value. The AWS credentials and security group depend on your configurations in the Amazon EC2 instance. The
tagValueare optional and the
Start the server as per the instructions in the Setting up a Cluster topic. If the cluster is set up successfully, you should not see any errors when the server starts up, and also see the following log message.
When new members join the cluster, you should see messages similar to the following.
When members leave the cluster, you should see messages similar to the following.