Azure will scale out for you (assuming you’re in the correct tier), spreading your activity functions over multiple instances. However, initiating new instances takes time, and Azure will not do that unless the current workload exceeds the current instance’s capacity, which is fine—we appreciate the cost-savings.
The maxConcurrentActivityFunctions
Setting
Luckily, you are allowed to configure the maximum amount of concurrent activity functions per worker using the maxConcurrentActivityFunctions
setting in host.json
.
|
|
Be aware though, setting this to a high number will result in this:
Azure will accommodate and exhaust that one single worker, making room for all the 10,000 activity functions you just unleashed! Not good! At least if you’re looking for high performance.
The Solution
What you need to do is set a realistic number of concurrent activity functions so that Azure distributes evenly and before the workload becomes unbearable. It should look like this:
By carefully tuning this setting, you can ensure optimal performance and avoid overloading a single worker.