Scaling Concurrent Execution of Activites and Workflows

How does Workers execute workflows and activities concurrently?
Is it through Multithreading?

Does increasing maximum concurrent workflow execution and activity execution variables of Worker, result in increase in number of threads equally?

How to approach scaling worker for handling concurrent workflow and activity executions?

  • Increase the hardware resource of the system in which worker is running

  • Increase the maximum concurrent workflow execution and activity execution variables of Worker

  • Add a new worker to the pool.

What should be the order when scalling?

You want to saturate the worker first. Unless your activities are memory bound increasing the number of polling threads and concurrent activity and workflow tasks will increase CPU usage.

When the worker is CPU bound then you can either change the hardware to the one with more CPU capacity or add more workers to the pool. There is no generic recipe to which one is better for all the use cases.

1 Like