Load testing on Camunda External Task Client using fetchAndLock mechanism

Hello,
I’m using external task client to complete my BPMN process. I want to perform the load testing to be conducted for camunda external task client. I have deployed the exteranl task client service as a k8s pod in OCP with number of pod count as 2. Now my service is running with 2 pods. For external task client in the configuration which is application.properties I have declared the worker id as cwaprocessworker like below.
Using fetchAndLock mechanism the tasks will be consumed/locked by the external task worker.

camunda.bpm.client.async-response-timeout=30000
camunda.bpm.client.subscriptions.fourEyeCheckDecisionTopic.process-definition-key=CollateralFourEyeCheck
camunda.bpm.client.subscriptions.fourEyeCheckDecisionTopic.lock-duration=120000
camunda.bpm.client.worker-id=cwaprocessworker
camunda.bpm.client.max-tasks=3
camunda.bpm.client.host=workbench.apps

Now with one worker id which is cwaprocessworker, how the load will be shared by both the pods.
If the load is getting shared then how can we verify the pod1/pod2 processing the requests and how to verify in database tables (let’s say H2 DB).
I have the pod logs and I can see that the requests are getting shared/processed by both the pods. But how can I verify the tasks/requests which are distributed using only one worker id in database side.
Below is the snippet which describes how the BPMN will looks like.

Please let me know if you need more details.

Thank you,
Ramanaiah Pirla.

For your scenario, i would recommend to use external db. If you use H2, deploy it as POD and increase your replica count, each will be treated as independent request. The event will be logged into the database and inspect the table: ACT_RU_JOB .

To validate your scenario, move into external DB. I would recommend to read an article:

Hi @Ramanaiah,

both clients/pods should become different worker IDs.

Hope this helps, Ingo

@cpbpm I’m using external database for camunda engine which is mssql server only.

@Ingo_Richtsmeier Below is the k8s deployment with 2 pods for the external task worker.

Service Name : cwa-process-worker (external task worker)
Deployment Name : cwa-process-worker
Pod Replica count : 2

So I have one application which is exteral task worker who has the config like below.
camunda.bpm.client.worker-id=cwaprocessworker

The same worker id should be applicable for both pods, how it will become different worker IDs?

Hi @Ramanaiah,

Maybe the answer from this stackoverflow thread helps: logging - Get a Kubernetes POD's full Id from inside of itself ( running container ) - Stack Overflow

They propose the hostname as a unique ID.

Hope this helps, Ingo

1 Like