We are running a large simulation in Azure Durable Functions using the fan out feature of orchestration functions.
Our desired behaviour is that the number activity functions instances rapidly provisions to process the entire fanout activities as quickly as possible.
Instead what we are seeing is that the number of instances grows to a level where a constant throughput of activity requests is reached and will grow no further. While this does burn down the backlog of tasks, we really want to process these tasks as quickly as possible.
Rather than for example the ~25 instances processing our entire simulation in 10 minutes we want 200 instances completing in just over 1 minute.
We are using Azure Functions 2.0 with the Durable Functions Extensions.
Our host file is below
{
"version": "2.0",
"extensions": {
"durableTask": {
"controlQueueBatchSize": 1,
"maxConcurrentActivityFunctions": 1,
"maxQueuePollingInterval": "00:00:02"
}
}
}
We set maxConcurrentActivityFunctions
to 1 such that each instance is processing 1 task at a time since the tasks are processor intensive.
We set controlQueueBatchSize
to 1 such that each instance only takes 1 task at a time leaving the remainder on the queue. We found that this does cause the scaling to increase the number of instances.
Any advice on how to get Azure Functions to provision more nodes would be much appreciated.