The latest release of WSO2 products which were based on carbon 4.0.0 supports worker-manger separation. In this post, you can find out how to configure worker-manager with two ELB's with single cluster and how it can be extended to another deployment. This patterns is clearly explained in Afkham Azeez's blog.
Worker-Manager clustering with two ELB's and one worker/manager cluster
Worker-Manager clustering with two ELB's and one worker/manager cluster
I have configured every instance in
different machine. The configuration can be found as following:
ELB-mgt
=========
repository/conf/loadbalancer.conf
esb {
hosts
mgt.esb.cloud-test.wso2.com;
domains {
wso2.esb.domain {
sub_domain worker;
tenant_range *;
}
}
}
repository/conf/carbon.xml
<MgtHostName>elb.mgt.wso2.com</MgtHostName>
Then you have to have the relevant
entry in the /etc/hosts for elb.mgt.wso2.com.
ELB-worker
===========
repository/conf/loadbalancer.conf
esb {
hosts
esb.cloud-test.wso2.com;
domains
{
wso2.esb.domain {
sub_domain worker;
tenant_range *;
}
}
}
repository/conf/carbon.xml
<MgtHostName>elb.worker.wso2.com</MgtHostName>
Then you have to have the relevant
entry in the /etc/hosts for elb.worker.wso2.com.
I have assumed here that port offset of
both ELB's are kept as default and they are running in different
machine. Default ELB's transport port https:8243, http:8280
Worker-cluster
==============
All worker nodes can be configured as
in
(http://docs.wso2.org/wiki/display/ELB203/Setup+ELB+with+WSO2+ESB)
for clustering and proxy set up. Also, add the relevant entries to
/etc/hosts
in addition to the configuration, you
will have to add the following to all worker node as like management
node (can find the place in documentation).
repository/conf/axis2/axis2.xml
<property
name="port.mapping.8280"
value="9764"/>
<property
name="port.mapping.8243"
value="9444"/>
9764,
9444 can be veried according to your port offset of servlet
transport. 8280, 8283 are ELB's transport. If two ELB for one
cluster, then both should be kept in the same transport port.
Special node which will
be manager and worker
==========================================
Have to configure like
above worker node cluster and in addition to that need to add
repository/conf/carbon.xml
<MgtHostName>mgt.esb.cloud-test.wso2.com</MgtHostName>
repository/conf/axis2/axis2.xml
Instead of one member, need to add two
ELB as well known memebers.
<members>
<member>
<hostName>
elb.mgt.wso2.com
</hostName>
<port>4000</port>
</member>
<member>
<hostName>
elb.worker.wso2.com
</hostName>
<port>4000</port>
</member>
</members>
repository/conf/axis2.xml.
<parameter
name="WSDLEPRPrefix"
locked="false">http://esb.cloudtest.wso2.com:8280</parameter>
/etc/hosts
of special node should include
.
<ip
of ELB worker> esb.cloud-test.wso2.com
<ip of ELB managee>
mgt.esb.cloud-test.wso2.com
<ip of ELB worker>
elb.worker.wso2.com
<ip of ELB manager> elb.mgt.wso2.com
Single cluster with one
ELB where one node worker/manager and accessible directly
==================================================================
All workers need to configure as stated
in the documentation.
Special Node :
As stated in the above setup for
special node, you will have to follow up,
adding only one member as a well known
member as following:
<members>
<member>
<hostName>
elb.worker.wso2.com
</hostName>
<port>4000</port>
</member>
</members>
removing the proxy
port in repository/conf/tomcat/catalina-server.xml and keep
other configurations as it is.
All the other configuration should be
kept as previous setup manager node. Now you can eliminate the
manager ELB and work on this setup accessing management console
directly via https://mgt.esb.cloud-test.wso2:9444
(servlet transport port) and worker requests can be served via
https://esb.cloud-test.wso2:8243 via
ELB.
Also, add the /etc/hosts as similar as
above setup to the special node machine.
References
========
1. http://blog.afkham.org/2012/08/separation-of-worker-management-nodes.html
2. http://charithaka.blogspot.com/2012/09/setting-up-minimum-deployment-of-wso2.html