AZ-104 Microsoft Azure Administrator Exam

You're a great admin... on-prem. Now, become a great admin in the cloud and prove it by passing the Microsoft Certified: Azure Administrator Associate exam!

Practice Test

Exam

Configure scaling for an App Service plan

Implement Autoscaling Rules

Understanding Autoscaling

Autoscaling in Azure is an essential tool designed to help applications remain reliable and easily scalable by adjusting resources automatically based on current demand. It allows for dynamic configuration, especially for stateless apps where new instances can be added for increased flexibility and scalability. This proactive adjustment ensures that applications run smoothly without consuming unnecessary resources, making operations cost-effective.

Disabling ARR Affinity Cookies

ARR Affinity cookies are automatically enabled on your App Service. However, these might not be necessary if you opt for automatic scaling. Disabling them can be straightforward:

  • Access your App Service app from the Azure portal.
  • Navigate to Settings, then select Configuration.
  • Within the General settings tab, set Session affinity to Off.
  • Click Save to confirm your changes.

Disabling session affinity makes sure requests can be distributed evenly across instances, which is crucial for maintaining performance during high demand.

Autoscaling in Azure Container Apps

In containerized applications, autoscaling can be implemented via the Durable Task Scheduler, efficiently adapting to fluctuating demands without manual intervention. This involves managing settings like:

  • Min replicas: The least number of container replicas you allow.
  • Max replicas: The maximum number you permit.
  • Endpoint: The essential link to the Durable Task Scheduler.
  • Managed identity: Useful for assigning either user or system identities linked to the scheduler.

These settings ensure containers can adjust their performance capabilities swiftly and are optimized for workload demands.

Configuring the Autoscaler

Configuring the autoscaler can be done through various means including the Azure portal, Bicep templates, and even using Azure CLI. Specifically, through the Azure portal, a user can define the minimum and maximum replica settings easily. This straightforward configuration enables users to ensure that their applications remain responsive and efficient under any demand patterns.

Benefits of Autoscaling

The primary advantage of autoscaling is its capacity to minimize costs by only utilizing resources when necessary. When tasks arise, virtual machines scale up to complete them and scale down when they are not needed any longer. This kind of dynamic allocation helps organizations achieve optimal performance while maintaining cost efficiency. As demands fluctuate, autoscaling aides in keeping resources geared towards exactly what is needed without any waste.

Next Steps and Exploration

For those looking to deepen their understanding or explore more opportunities around autoscaling:

  • Microsoft Cost Management & Billing helps examine resource utilization and component billing.
  • Azure Spot VMs with Batch offer low-cost compute options for interruptible workloads.
  • Flexible orchestration modes for scale sets allow custom configurations in Azure.

Together, these exploration points offer a pathway for maximizing autoscale readiness and efficiency in real-world business scenarios.


Overall, configuring scaling for an App Service plan involves understanding autoscaling rules and how to appropriately apply them based on metrics like CPU usage or memory. With this knowledge, students can capably manage resources ensuring applications function at peak performance while controlling costs. This foundation is pivotal in preparing individuals to tackle Azure's dynamic cloud challenges effectively.