Clustering is one of a major requirement for web servers which are in production environment. because these servers have to fulfill two basic needs, high availability and scalability.
WSO2 carbon based web products comes with the clustering functionality (Please refer this article for more information on WSO2 carbon clustering) Here I am going to introduce to configure the WSO2BPS in a clustering environment.
1. You can download WSO2BPS (version 1.1.1) from here.
2. All nodes in BPS cluster would share the same persistence storage (BPS datasource) and same registry. So Each node must be connected to external datasource and external registry. This Post is described configuration of external BPS datasource. Use same configuration for all nodes, But don't forget to use different provider port for each node, if you are starting all nodes in same machine (same url).
3. Then registry.xml and user-mgt.xml (Both are in WSO2BPS/conf directory)must be configured to use a one central registry. Use same configuration for all nodes.
Sample configuration of registry.xml for Mysql database
<dbConfig name="wso2registry">
<url>jdbc:mysql://10.100.1.1:
<userName>regadmin</userName>
<password>regadmin</password>
<driverName>com.mysql.jdbc.
<maxActive>80</maxActive>
<maxWait>6000</maxWait>
<minIdle>5</minIdle>
</dbConfig>
Sample configuration of user-mgt.xml
<Database>
<URL>jdbc:mysql://10.100.1.1:
<UserName>regadmin</UserName>
<Password>regadmin</Password>
<Dialect>mysql</Dialect>
<Driver>com.mysql.jdbc.Driver<
<maxActive>30</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
</Database>
4. Then One BPS node must be started as the group management node. you can simply do this by configuring following basic parameters in axis2.xml (WSO2BPS/conf directory)
# Enable clustering for this node
<clustering class="org.apache.axis2.
# Clustering domain/group
<parameter name="domain">bps</parameter>
# Enable the group Management
<groupManagement enable="true">
<applicationDomain name="bps" description="BPS group" agent="org.apache.axis2.
</groupManagement>
5. Other BPS nodes also should be started with enabling the clustering (Can enable or disable node management, but there is no effect for BPS. So here i did not use it)
# Enable clustering for this node
<clustering class="org.apache.axis2.
# Clustering domain/group
<parameter name="domain">bps</parameter>
6. Start every BPS node running the wso2server.sh (in unix) or wso2server.bat (in windows) file in the WSO2BPS/bin directory. Don't forget to use different http and https port for each node, if you are starting all nodes in same machine (same url). Configuration can be found in transport.xml and axis2.xml
By looking at Debug and INFO message you can understand what is happening there.
But WSO2BPS (version 1.1.1) have some limitations when setting on clustering ( Retiring of BPEL process not propagate to other node, Managing BPEL packages and processes should be disable for member nodes) which would be resolved in next BPS release.........!!!
No comments:
Post a Comment