We want to deploy our camunda engines with all the flows within across multiple nodes sharing a same oracle sql database.
And when we start a process instance then it can be picked up by any of the nodes.
I guess that it is same as the homogeneous clustering.
Is there any configuration to achieve this ?
New to camunda so need help in setting this up!!
@Anirudh, no, there’s no special setup you need to do this. You can start multiple instances of the same application containing Camunda and make sure they point to the same database. They will all pick up work that needs to be done and organise the division of the work amongst themselves.
Thanks for the quick reply @tiesebarrell
In addition to the above
It is mentioned that - The engines are assumed to have distinct process definitions, which means that the one process definition (same key and version) is not deployed on two or more engines at the same time.
So does that mean i will have to update the bpmn files on each node and change their process definition key?
@Anirudh The documentation you point to is for Optimize, connecting to multiple engines to extract historic process execution data. The point of that comment is that if you point Optimize to multiple engines, it expects that information on each process definition is unique to the engine. Otherwise, it would have to do a complex merge of the information in multiple engines just to compose an aggregated view of a single process definition.
For execution of process instances, the shared database setup isa standard way to cluster and this is not an issue. So, you would not have to change anything to the process definitions to execute process instances in multiple engines.
When i start the engine on the first node it starts properly
But when i try to start the second node it gives this error
ENGINE-03005 Execution of ‘DELETE EventSubscriptionEntity[57dbc5fa-1109-11ea-bd40-5076afce8669]’ failed. Entity was updated by another transaction concurrently
Any configuration related issue ?
Are you starting multiple engines in the same VM?
@tiesebarrell No in different vm
It could be a timing issue, but if you started the first engine completly first, before startng the other, I woul donly expect that message if you have extremely short repetitive timer events.
Not using any timer events
Workflow.bpmn (12.6 KB)
It could also happen with message subscriptions, in particular for start events. Not sure why this would be caused other than an odd timing issue though - if the processes are the same then it should normally not be an issue. There are other errors in your model though, for instance you have boundary events leading nowhere from a couple of activities.
Is this still applicable with Docker containers running in Kubernetes clusters?
Can I simply just increase the replica set of the Camunda instance pods with same DB connection string for this to work?
Also, how will the UI work? Will there be additional configuration required or will we have to use Optimize?
Loadbalance /engine-rest to all pods,
Loadbalance /camunda to first pod other as backup only
Indeed, it applies in the same way to Docker containers in Kubernetes. You can start as many pods as you like and connect them to the same database. Keep in mind though, that there are limits to the number of connections your database might be able to support, so at some point the scaling will end
As MaximMonin pointed out, you will need to load balance the access to the REST API over the pods, if you’re using it. And you can use just one web app instance (for instance, one of the pods if they include the webapps, although you might also deploy it separately) to operate all.