0
votes

What are the scale out factors for Azure Function on Consumption Plan?

If i have a Azure Function with a time trigger running once every 5 mins will this keep my functions in warm state and running normally forever?

In addition to above, will the scale out work if there are background threads processing running that requires more Azure Functions instances?

What about auto scale in when the background threading reduces resources usage.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

https://docs.microsoft.com/en-us/azure/azure-functions/functions-premium-plan

Azure Functions Timer Trigger Scale-out

How do Azure Functions scale out?

1

1 Answers

2
votes
  1. Scale-out factors vary by trigger type. For example, an HTTP-triggered function's scaling depends on request concurrency, while a queue-triggered function's scaling depends on queue depth.
  2. If you have a timer trigger that runs once every 5 minutes, your function app will always be loaded onto one instance. You'll be able to avoid a complete cold start (from 0 instances) this way. However, a scale-out will require your app to be loaded onto another instance. The time taken to load your app onto the new instance will incur a delay for those requests. If you want a constant low latency with autoscaling, you may want to look at the premium hosting plan.
  3. Background thread processes have no direct effect on the consumption plan's scaling logic.
  4. This is possible, but not guaranteed. Example: if background threading is slowing processing of queue items in a function, the queue depth may increase to the point that it scales out.