Share via

App Service Plan scale out instances distribution over Availability Zones with per app scaling

Priyanka Chaudhuri 125 Reputation points
2023-06-27T15:16:19.4933333+00:00

Let us consider a scenario where

  1. the ASP has zone redundancy enabled
  2. that means by default the current ASP instance count will be 3
  3. 1 instance deployed per zone
  4. If the ASP's scale out has been configured to 5, say using the manual scale option
  5. Azure distributes zone 1 -> 2 ASP instances, zone 2-> 2 ASP instances and zone 3 -> 1 ASP instance
  6. A Web App on that ASP has been configured to use per-app scaling to 3 instances

Now my question is

a. How will the web app instances get distributed across the ASP instances? We would expect all three instances of the Web App to be constantly running and serving requests?

b. Is there any probability that Web App will be deployed/ run simultaneously from more than 1 zone?

c. Does that mean more than 1 zone will be actively responding to requests made to the Web App?

Please could you help clarify my doubt.

Thanks.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

{count} votes

Answer accepted by question author
  1. Ajay Kumar N 28,161 Reputation points Microsoft Employee Moderator
    2023-07-01T13:41:54.9866667+00:00

    @Priyanka Chaudhuri ,

    Apologies for the delay! Thanks for your patience and great question!

     

    (Per app scaling + zone redundant ASP -the 2 features operate independently; they are different features. Per app scaling may pick the instances to run on with no decisions based on zones those instances are in. 

    a. As mentioned in the doc - manage-scale-per-app

    “Apps are allocated to available App Service plan using a best effort approach for an even distribution across instances. While an even distribution is not guaranteed, the platform will make sure that two instances of the same app will not be hosted on the same App Service plan instance.

    The platform does not rely on metrics to decide on worker allocation. Applications are rebalanced only when instances are added or removed from the App Service plan.”

    When you configure a Web App to use per-app scaling, the platform automatically spreads the instances of the Web App across all available instances of the App Service plan. In this case, since the App Service plan has 5 instances, all 3 instances of the Web App will be spread across those 5 instances of the App Service plan. This means that all 3 instances of the Web App will be constantly running and serving requests.

     

    b. Yes, it is possible that the Web App will be deployed/run simultaneously from more than 1 zone. When you have zone redundancy enabled, the platform automatically spreads the instances of the App Service plan across all available zones in the region. This means that the instances of the Web App may be running on different instances of the App Service plan in different zones.

    c. If the features are independent, and you have per App scaling of 3, and ASP count of 5 in a region with 3 zones (no zone >3 instances total), then it would make sense that those 3 instances would need to be taken from multiple zones.

    When you have zone redundancy enabled and the instances of the Web App are running on different instances of the App Service plan in different zones, it means that more than 1 zone will be actively responding to requests made to the Web App. This provides increased resiliency and reliability for your Web App, as requests can be automatically routed to healthy instances in other zones if one zone experiences an outage.

    Reference:

    Reliability in Azure App Service

    App Service Support for Availability Zones - Azure App Service and Migrate App Service to availability zone support

    Kindly let us know If you have further questions, we will be more than happy to assist you further.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.