Introduction
Azure App Service is a fully managed platform for building, deploying,
and scaling web apps, with the compatibility of various runtimes and
frameworks. Automatic scaling is a new feature that will be important for
scaling the instance based on dynamic and unpredictable traffic patterns. We
can adjust the scaling settings and ensure the performance of the app service.
How does the Azure App Service Autoscaling option works?
This feature will work based on the HTTP traffic which
received to the app service and monitor the load, the performance and scale out
the app service instance. Enabling the automatic scaling for App service plan
can setup range of instances for each web apps and also the resources can be shared
for multiple web apps within the app service plan for scale out.
Prerequisites for Enabling Automatic Scaling Feature
- Azure Subscription and Resource Group
- Azure App Service Plan (This feature only eligible with premium V2 & V3 app service plans)
- Azure App service the application setting "Always ON" should be disabled before enabling this automatic scaling option.
Maximum and Minimum Scaling Limits
The minimum scaling limit should be 1 instance and if we need to adjust the limit, the app level settings we have to specify the minimum number of instances. When the load exceeds the additional instances are been provisioned based on the limit specified on the maximum burst for the App service Plan. The maximum scaling limit will be define based on the maximum number of instances that can be scale out within that app plan. This instance count may be in between 1 and the maximum burst.
Configure the Minimum Scale Limit
Go to App Service -> select scale-out
(App Service Plan) -> Update the minimum scale Instance limit ->
Select Save Button.
Configure the Maximum Scale Limit
Go to App Service -> select scale-out (App Service Plan) -> Enable Enforce scale out limit -> Enter the maximum scale instance value ->Select Save Button.
Prewarmed Scaling InstancesThe prewarmed instance setting provides warmed instances as a
buffer during the Http scaling and instances can be buffer until the maximum
scale out limit is reached. The default prewarmed instance value will be 1 instance,
and this cannot be changed using the azure portal. For that we must use the
Azure CLI.
"az appservice plan update --resource-group <RESOURCE_GROUP> --name <APP_SERVICE_PLAN> --elastic-scale false"
Load Testing Approach
Azure App Service Automatic scaling can be enabled by have a
proper load testing on the App service by using the load testing feature. On
the load testing the team can monitor the performances and the throughput to
get a good idea how the scaling threshold should be placed on. This approach
will be more practical and minimize the downtime and enhance the user
experiences.
Conclusion
This will cover the importance of automatic scaling for
azure web apps and ability to improve the performance, throughput and reduce
cost by giving a good user experience.
Comments
Post a Comment