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.

Prerequisites
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>
...
...
</cluster>

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

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

Step 2
Edit the ./wso2esb.sh file of both the instances (cluster1 and cluster2) and add the following
-Daxis2.local.ip.address=<Your_IP>

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

2 comments:

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

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