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:
and here is calling via another App Service:
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.
Scale out
>Dynamic Scale out
>Maximum Scale Out Limit
was set to1
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.