Wednesday, September 24, 2008

Setting up WSO2 ESB in a clustered environment

I will briefly describe how one can easily set up WSO2 ESB in a clustered environment.

Download the latest version of WSO2 ESB and extract to a folder of your choice. (I will refer to the two WSO2 ESB instances as cluster1 and cluster2)
NOTE: I will be having both the WSO2 ESB instances on my local machine.

Step 1
Out of the two WSO2 ESB instances, select one and edit the default ports. (cluster2)
a) axis2.xml ($ESB_HOME/webapp/WEB-INF/classes/conf)
- To enable clustering uncomment the following of both ESB instances
<cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager">

<parameter name="AvoidInitiation">false</parameter>
<parameter name="domain">wso2esb.domain</parameter>

- Change the HTTP and HTTPS ports specified in the axis2.xml of cluster2 (E.g.:- HTTP - 8281 , HTTPS - 8244)

b) of cluster2 should also be changed as follows ($ESB_HOME/tomcat/config)
Change the Admin console port given in the file (E.g.:- 9443)

Step 2
Edit the ./ file of both the instances (cluster1 and cluster2) and add the following

Step 3
Now you are all ready to start the two WSO2 ESB instances in the clustered environment


Asanka said...
This comment has been removed by the author.
Asanka said...

I think you have to change the localMemberhost to the machine IP from default ( and use different ports for localMemberPort (e.g. 4000 and 4001)