question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Would like more control over scaling durable functions

See original GitHub issue

Would be great if we could have more control over how azure functions scale when the performance of running a fanout orchestration is important.

See this post

Would be great if we could have something like this, rough and would need much more thought but something along these lines.

 var activityBatchRequest = new DurableFunctionBatchRequest<TResult>
            {
                ActivityName = "ComputeItems",
                ApproximateCpuTimePerActivity = new TimeSpan(0, 0, 0, 10),
                RequestedExecutionTime = new TimeSpan(0, 0, 0, 20),
                Activities = activities
            };
            var tasks = orchestrationContext.CallActivityBatchAsync<IEnumerable<TResult>(activityBatchRequest);

This way Azure could calculate roughly how many vm’s to scale out to so it can attempt to meet the users request time

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
BenjaBobscommented, Nov 18, 2019

@ianadavies

Hi, after poking around a bit I found that you can achieve some control with a Premium Plan.

By sending the following requests you can control the following. Note: It requires the Contributor role for plan and the functions app respectively

Instance Count:

PATCH https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Web/serverfarms/<premiumPlanName>?api-version=2018-11-01
Authorization: <bearer token>
Content-Type: application/json

{
    "id": "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Web/serverfarms/<premiumPlanName>",
    "kind": "elastic",
    "location": "<location>",
    "name": "<premiumPlanName>",
    "properties": {
        "numberOfWorkers": 20, 
    },
    "sku": {
        "capacity": 20, 
    },
}

Pre-warmed instance count:

PATCH https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Web/sites/<functionsAppName>/config/web?api-version=2018-11-01
Authorization: <bearer token>
Content-Type: application/json

{
    "id": "/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Web/sites/<functionsAppName>/config/web",
    "name": "<functionsAppName>",
    "type": "Microsoft.Web/sites/config",
    "location": "<location>",
    "properties": {
        "reservedInstanceCount": 20,
        "functionsRuntimeScaleMonitoringEnabled": false
    }
}

It doesn’t help you much if you’re still set on Consumption Plan though.

0reactions
ianadaviescommented, Oct 25, 2019

@cgillum You mentioned here that you had plans to make this possible later this year. Any news on this?

I have opened this ticket on StackOverflow https://stackoverflow.com/questions/51657553/azure-durable-functions-scaling/51659347

This is becoming a real problem for us now as we are ready to demo our software to potential clients and I was expecting to be able to scale to 200 nodes since the consumption plan supported this.

Is there anyway we can connect and show you the problems we are having ?

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance and scale in Durable Functions - Azure
The Scale Controller monitors how long messages and tasks have to wait before they are processed. Based on these latencies it can decide...
Read more >
How Azure Durable Functions scale
The Azure Functions scale controller monitors the latency of peeking messages from the work item queue and increases/decreases the number of ...
Read more >
Azure (Durable) Functions - Managing parallelism
MaxConcurrentOrchestratorFunctions controls how many orchestrator functions can be loaded into memory at any given time.
Read more >
Performance Tuning of Azure Durable Functions
Performance Tuning of Azure Durable Functions · 1. Work item Queue(s) · 2. Control Queue(s) · Queue polling. The durable task extension implements ......
Read more >
Custom Autoscaling with Durable Functions
Custom Autoscaling with Durable Functions · Scaler function applies the scaling decisions to the Azure resource, App Service Plan in my case.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found