0

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.

Lenny D
  • 1,734
  • 4
  • 22
  • 43
  • Hm, I am using the fan-out pattern as well - without setting any parameters in the host.json. I spawn about 250 tasks which get processed in rapid succession. So generally that should work. I assume you are running in consumption plan? – silent Oct 25 '19 at 09:07
  • Yes on the consumption plan. The number of tasks is not important. Do you know how many instances you are scaling to? How processor intensive and how long does each task take? You can get this from application Insights – Lenny D Oct 25 '19 at 09:08
  • ah sorry. Yeah all my tasks were processed on only 5 instances – silent Oct 25 '19 at 09:15

0 Answers0