Lesson 2 of 5 Azure App Service Plans and Web Apps

Scaling App Service Plans Up and Out

This lesson explains scaling up and scaling out, and the differences between manual scaling, autoscale and automatic scaling.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish between scaling up and scaling out.
  • Distinguish between manual scaling, autoscale rules and automatic scaling.
  • Choose a scaling configuration for a requirement.

Scale up

Scaling up changes the plan's pricing tier or instance size on the Scale up (App Service plan) page, to gain CPU, memory, storage or features such as deployment slots. It applies to all apps in the plan, usually completes within seconds without code changes, and may restart apps. Scaling down to a tier that lacks a feature in use, such as slots or more instances than the tier allows, is blocked until the feature is removed.

Scenario questions

Scaling up and down

Exam skills 3.4.2

Decide what happens when a plan's tier changes.

Log in to try this activity Interactive activities are free with an account.

Scale out

Scaling out changes the number of instances on the Scale out (App Service plan) page. Three methods exist, depending on the tier.

Manual
TiersBasic and above
HowSet an instance count
ConfigurationCount only
Choose when Predictable, steady load
Autoscale (rules)
TiersStandard and above
HowAzure Monitor metric and schedule rules
ConfigurationMin, max, default, rules, profiles
Choose when Custom metrics or schedules
Automatic scaling
TiersPremium v2 and above
HowPlatform scales on HTTP traffic
ConfigurationMaximum burst, always-ready instances
Choose when Web traffic with minimal configuration

Autoscale uses the same Azure Monitor engine as scale sets: profiles with minimum, maximum and default counts, rules on metrics such as CpuPercentage, MemoryPercentage, HttpQueueLength or metrics of other resources, cool-down periods, and schedules. Automatic scaling is platform-managed: App Service watches HTTP traffic and adds instances, keeping a number of always-ready instances warm and limited by a maximum burst; it cannot be combined with autoscale rules. Per-app scaling limits an individual app to a number of the plan's instances.

The following diagram shows an internal app's instance count over a weekday under two autoscale profiles.

Autoscale profiles for an internal app on a Standard S2 plan. The default profile keeps 1 instance; a recurrence profile for weekdays 08:00 to 18:00 has minimum 4, maximum 8 and default 4, with a CPU above 70% scale-out rule and a matching scale-in rule. Automatic scaling is not available in Standard and cannot follow a schedule.
The scenario is illustrative.
Sort into groups

Which scale-out method?

Exam skills 3.4.2

Choose the scale-out method that fits each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

Scaling during business hours

An internal web app on a Standard S2 plan needs 4 instances from 08:00 to 18:00 on weekdays and 1 instance otherwise. During business hours, it should go up to 8 instances if CPU exceeds 70%. What should you configure?

Enable autoscale on the plan with a default profile of 1 instance and a recurrence profile for weekdays 08:00 to 18:00 with minimum 4, maximum 8, default 4, a scale-out rule on CPU above 70% and a matching scale-in rule. Automatic scaling is not available in Standard and cannot use schedules, and scaling up to a bigger size would not provide the time-based instance counts.

Check yourself

Can automatic scaling and autoscale rules be used together on the same plan?

Show answer

No. They are alternative scale-out methods.

Exam Tips

Remember for the exam

  • Scale up for bigger instances or features; scale out for more instances.
  • Autoscale rules need Standard or higher; automatic scaling needs Premium v2 or higher.
  • Use recurrence profiles for business hours.
  • Scaling applies to every app in the plan.