I am trying to setup a cluster of Camunda nodes. Going by the documentation and online help, it seems like i should have two or more camunda instances pointing to the same DB and connect to a load balancer. In my case i did the following:
- Download the latest Camunda community edition (tomcat distro), changed the port to 9000 and added a data-source. Then started camunda engine.
- Made a copy of the camunda in step 1 (to have same data-source) and changed port to 9002. Then started camunda engine.
- Created a web app that has 2 service tasks in between a start and end task. Async before and after, both are checked. also the java class for both service tasks just prints a message and then sleeps for 10 seconds to replicate a long task. An then prints another message.
- Deployed the web-app in both camunda engines, and restarted both tomcats.
Expected behaviour:
When i start a new process using tasklist, the task can be recieved by any of the two camunda nodes. And then it can be executed by any of them. Also when 1 camunda node goes down, the other one should pick up the task and execute it.
Observed behaviour:
On starting a new process, the below is observed:
- The call goes to any of the two nodes and the entire workflow is executed on that node only.
- when the node that is executing the process goes down (while still in the sleep cycle), the other node is not picking up the process and executing it.
I am not sure what extra needs to be done here to achieve failover for Camunda cluster. Please advise.