japane
japane

Reputation: 51

Limit number of servers on Azure functions (consumption plan)

Is it possible to fix a cap on the number of servers on which the azure functions scale? I have a consumption plan and basically I would like to set a cap on the number of resources that azure functions can use.

The only solutions I found are:

Upvotes: 2

Views: 1589

Answers (2)

loomchild
loomchild

Reputation: 778

One thing to note is that timer-triggered functions are automatically singletons. In my case that was sufficient, as I can wake-up such function every minute and process specific amount of data. Even if the function takes longer than expected, there's no risk a second one will be run concurrently.

More info: https://stackoverflow.com/a/53919048/4619705

Upvotes: 0

Simon Luckenuik
Simon Luckenuik

Reputation: 355

You can use the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT app setting: The maximum number of instances that the function app can scale out to. Default is no limit. Note: This setting is a preview feature - and only reliable if set to a value <= 5

Ref: https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#websitemaxdynamicapplicationscaleout

Upvotes: 2

Related Questions