0

I'm using Azure Durable Functions to compute long, CPU-consuming process (implemented in a C++ node module). Message handling can take several minutes. I have set host.json so that messages are not processed in parallel :

"extensions": {
        "queues": {
            "batchSize": 1
        }
    },

I'm received messages via an HTTP trigger and my code is set to create a new OrchestrationClient on each message :

const client = df.getClient(context);
const instanceId = await client.startNew(functionName, undefined /* instanceId*/ , input);

I was hoping that Azure would automatically spawn a new instance (or at least an Orchestration) when a message is being processed and a new one is received. Unfortunately, instead of doing so, it just wait for the instance to be released. Is there a way to force Azure to create a new instance ? Can I use such thing as a Singleton to lock the instance and make it unuseable while it's busy? I have read on MSDN that the creation of instances relies on a heuristic that basically monitors the number of incoming events, which in my case is very low. I'm using Consomption plan.

Thanks

  • 1
    Hi, did you find the answer? I've same use-case as yours – human May 03 '21 at 10:43
  • Hi, I was advised by a MS support engineer to look into the Batch feature in Azure. It is quite similar to Durable Functions but provided additional controls to load and start instances. I haven’t tried it yet. – Cédric Mallet May 08 '21 at 09:54

0 Answers0