1

I’m working on hosting multiple applications using Azure App Service, and I want to optimize resource usage by enabling Per-App Scaling. My goal is to host a high-density number of apps on the same App Service Plan without performance degradation.

My Setup:

  1. I’m using a PremiumV3 App Service Plan.
  2. I have multiple apps running, each consuming different levels of resources.
  3. Some apps require more scaling (CPU/memory), while others do not.
  4. Currently, all apps scale uniformly, leading to inefficient resource usage.

What I’ve Tried:

  1. Enabled auto-scaling based on CPU usage, but this approach scales all apps simultaneously, regardless of their individual needs.
  2. Reviewed Azure documentation for Per-App Scaling, but I’m not clear on how to implement it correctly.

Sample Example:

Here’s an example scenario:

  1. App A consumes a significant amount of CPU and memory due to heavy computational tasks.
  2. App B is a lightweight web app that handles low traffic.
  3. I want to configure App A to scale up to more instances under load, while App B remains unaffected, ensuring efficient resource allocation.

What I Expect:

I would like to scale individual apps independently within the same App Service Plan, ensuring that high-resource-consuming apps don’t impact the performance of smaller apps. How can I configure Per-App Scaling in Azure to achieve this?

Any examples, configurations, or best practices would be greatly appreciated!

1
  • 1
    To enable per-app scaling in Azure App Service, you need to designate an App Service plan as the high-density plan and scale it out to desired capacity. Then, set the PerSiteScaling flag to true on the App Service plan. New apps are created and assigned to that App Service plan with the numberOfWorkers property set to 1, which yields the highest density possible. The number of workers can be configured independently per app to grant additional resources as needed. Check- learn.microsoft.com/en-us/azure/app-service/… Commented Sep 28, 2024 at 5:31

1 Answer 1

1

To enable per-app scaling in Azure App Service, you first need to ensure you are using a Premium-tier App Service Plan. Then, you can enable Per-App Scaling and set the PerSiteScaling flag to true on the App Service plan.

az appservice plan update --name <arko-appserviceplan-name> --resource-group <arkorg> --per-site-scaling true

check this link for different command extensions

To set the number of instances per App

az webapp update --name <arkowebapp> --resource-group <arkorg> --set siteConfig.numberOfWorkers=<desired-instances>

Checkout this doc and thread for update command details.

This allows each app under the same plan to scale independently. Check- learn.microsoft.com/en-us/azure/app-service/…

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.