Azure Functions on app service plan over isolate plan ASE are not working well

Alejandro Benitez Aragon 41 Reputation points
2022-01-27T14:09:00.247+00:00

Hi guys, we currently have an App Service Environment (ASE) to host azure functions. In this ASE we have an I2 size ASP (2 cores, 7Gb RAM, 1Tb HD, Linux). We deploy 50 Functions App (NetCore 3.1) which are mixed between standard functions and durable functions.

Our problem is that when all the functions are up (50), they don't respond 100% of the time or take a long time to start their process or respond or just halfway through the process they don't respond regardless of whether the other functions in the ASP are on or off. not doing any work.

As a temporary solution we have seen that by turning off half of the functions the general behavior improves.

We do not know if the number of functions or if some configuration parameter is missing.

Thank you very much for any help or guidance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,321 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,958 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,261 Reputation points Microsoft Employee
    2022-02-02T18:30:52.347+00:00

    @Alejandro Benitez Aragon Thank you for reaching out with your question about ASE load distribution. We are sorry to hear you have encountered this experience.

    Firstly, we wanted to verify that you are indeed correct and found the cause of the slowness yourself. This is being caused by having too many apps (web or function) running on the hardware you have selected. This is verified by you shutting down apps and seeing the problems go away.

    While the documentation states that you have unlimited apps with the isolated tier, it should be called out that there is still a hardware limitation. Each app has it's own processes that are running in the background so having 50 apps means there are 50 background tasks running as well. Even if your apps are small in nature, this alone can cause bottlenecks and resource issues.

    There are two solutions here:

    1. Scale up to a larger instance. If you are using I2 size, then please consider trying I3 size.
    2. Split your apps into different App Service Plans(ASP). Each ASE can have different ASPs and you can assign instances to each ASP. With this approach, you might be able to run two ASPs running on the I1 plan.

    Ultimately, we would suggest doing a costs analysis to see which route might be cheaper. You can also scale up to an I3 instance for 1-3 hours to see if that brings relief. Costs for running an I3 instance for a few hours would be slightly higher but remember to scale back down. (Please note we cannot provide pricing guidance on the forums due to regional and country pricing differences.)

    To help future proof yourself, I would suggest splitting out to two or more ASPs now in case you have plans to add more apps.

    To do this:

    1. Create a new ASP within your ASE.
    2. Go to the app you wish to move and select the "change app service plan" blade
    3. Follow the steps to select the new ASP and complete the move.

    (Note that you cannot use this feature to move between ASE. Both ASPs must be within the same ASE. More information can be found here.

    0 comments No comments