Tuesday, December 29, 2009

How to set up BPEL cluster

In my previous posts i have discussed how to set up an applicaiton server cluster.I have missed the part how to configure the bpel cluster.

I will start from the point that you have SOA Suite installed on two different machines and you have oc4j_soa container on both the hosts.

Both the container or SOA suite should have the same dehydration store.Now just install bpel process manager on both the host on top of the container oc4j_soa.

Once bpel is installed on both the node you need to do the following in order to set up a bpel cluster.

Go to SOA_Home/bpel/system/config/collaxa-config.xml file

Set the "enableCluster" property to "true" for all BPEL nodes in the cluster.


Set Value of the "clusterName" property to "Load-balancer host:port", which needs to be the same for all bpel nodes in a cluster in order for them to find each other

It will be more clear from this diagram




As you can see we have set the "enableCluster" property to "true"

and in the Load balancer host and port number i have define the value myLBR.com:7777

here myLBR.com is my host name for the load balancer and 7777 is the port number in which my load balancer is running.Oracle provide web cache as a load balancer however you can have some other load balancer like pen or you can have hardware load balancer like bigip but hardware load balancer are too costly in comparison to software one.

Once these settings are don save the file and exit now go to the following directory
SOA_Home/bpel/system/config/jgroups-protocol.xml file.

If nodes are on the same subnet, use UDP multicast method. mcast_port and mcast_addr properties must be the same for all nodes in the BPEL cluster.

As you can see in the following diagram



Here mcast port

mcast_port="123445"

value should be same in all the nodes of the cluster i.e. if we have two bpel nodes then in both the nodes we should have the same value for the mcast_port number.
Same applies for the mcast address.

mcast_addr="220.220.220.220"

A multicast group address is an ip address in the range 224.0.0.0 to 239.255.255.255 that identifies the members of an IP multicast group.It broadcast the same message to all members of an IP multicast group,In a cluster we give the same multicast address to all the nodes so all the nodes becomes a member of the multicast group and the messages are trasnmitted to all of them.




It should also be same in both the nodes of the cluster.

If the nodes are on different subnet you should use TCP protocol.I have often experienced that udp protocol gives issues so i would prefer to use TCP protocol even if both the hosts are on same subnet or in different.So in tcp protocol you will configure something like this.



here initial_hosts="myhostA[7777],myhostB[7777]" these are the two host which runs on 7777 port.

Now go to the following path

SOA_Home/bpel/system/config/collaxa-config.xml file.

Set "soapServerUrl" and "soapCallbackUrl" properties to loadbalancer url:port.YOu can also change the same from BPELADmin console also.Once done save the changes and now try to open the BPEL console from the loadbalancer url and port.

Check the functionality of the cluster by deploying a simple bpel process in one node and by default it should get reflceted in both the nodes.

Also try to bring fown one node and check if the console and processes are accessible.

2 comments:

Anonymous said...

Suppose we have SOA two node cluster high-available setup, and if we are doing changes in collaxa-config.xml file on node1 any other file from backend we need to implement these changes separately on node2 as well right?

Mikku said...

Yes Chetan you need not to make the changes in both the nodes,they should be exactly same.