Function App AutoScale issue

Uday Kasula 41 Reputation points
2022-11-16T05:41:28.77+00:00

Our Function app is in P2V3 tier with auto scale enabled with max 10 instances
we kept an auto scale condition with scale out by 1 when avg CPU > 10 and scalein by 1 when avg CPU <5
Here the issue is if we open the autoscale condition window the avg shows as 3% or 5% but in metrix it shows avg % as 23 or 30%
Why this difference is there, and always we are running 8-9 instances at a time

Thanks in advance

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,637 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,451 Reputation points
    2022-11-17T06:33:36.933+00:00

    Hi @Uday Kasula ,

    It is recommended to look at the CPU performance available in the Performance section in the Application insights of the function app. This gives accurate information about the CPU and memory utilization.

    261282-image.png

    Since the actual metrics show above 20% and due to the fact that the autoscale rule is set at CPU>10, you are seeing an increase in the number of instances. It is possible that the CPU utilization might be fluctuating between a value greater than scale in value and greater than scale out value. For example 8 and 13, so the instance is getting added continuously. So I would suggest you increase the scale in and scale out condition value.

    Hope this helps!