0

I am attempting to analyse the poor performance of an Azure Function when under load. This is a .NET 8 Isolated Function App (v4) running on Windows (64 bit). A small but significant number of requests lead to the behaviour shown below, where there appears to be some kind of overhead between the Http Trigger Function being called and the request being processed.

For example, the following is calling the Function App directly:

Sample end-to-end transaction from App Insights

and here is calling via another App Service:

Sample end-to-end transaction from App Insights

These are different requests, and possibly different symptoms but I suspect that the cause is the same. In both cases up to a third of the entire request duration seems to be unaccounted for. In both cases the only dependency that the Function App has is the SQL database so answers such as this do not seem relevant.

My hunch is that the area highlighted in green is potentially during some kind of scaling by the Function App, as it does not occur for the majority of requests. To prove this I would like to correlate any scaling activities with the timestamps here but can anybody advise how this may be achieved? Any other insights into the potential cause of the overhead would also be greatly received!

For reference, Azure Load Testing was used to replicate peak load.

2
  • After further investigation, it does appear that this may be related to autoscaling on the Consumption plan. Then the option Scale out > Dynamic Scale out > Maximum Scale Out Limit was set to 1 on the Function App the occurrence of issues such as the above seemed to be reduced. In addition, following these instructions helped identify when the app actually performed the scaling events. The tips in this question were also of assistance.
    – wolfyuk
    Commented Sep 11 at 7:33
  • Please post it as an answer, so it will help the community Commented Sep 16 at 4:02

1 Answer 1

1

I do agree and do the same way by scaling it out in Azure Functions:

enter image description here

In Scale Out, Set the maximum to 1.

Because you are using Consumption Plan, there will be cold starts. To avoid Cold starts use App service plan which has Always On option. This Option keeps your function always on.

Not the answer you're looking for? Browse other questions tagged or ask your own question.