App Service Plans, Scaling and Creating a Web App
30-second answer
An App Service plan is the set of VMs your web apps run on. Its pricing tier decides the instance size, how many instances you can have and which features you get: Free and Shared for testing, Basic (up to 3 instances, manual scale), Standard (up to 10, autoscale and 5 deployment slots), Premium v3 (up to 30, 20 slots, zone redundancy) and Isolated v2. Every app on a plan runs on every instance. Scale up changes the tier or size; scale out changes the instance count, by hand or with rules-based autoscale on a metric such as CPU percentage.
Simulate it » No Azure account neededExam objective: 3.4.1 Provision an App Service plan. 3.4.2 Configure scaling for an App Service plan. 3.4.3 Create an App Service. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Start on <strong>Home</strong>. Select the search bar.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Start on Home. Select the search bar.
- Type app service plans in the search bar and pick App Service plans under Services.
- The plan is the compute: region, OS and pricing tier decide the VMs your apps run on and the features they get. B1 ≈ $13 a month per instance (illustrative).
- Review and Create.
- Create the web app and put it on that plan. Same region and OS, or the plan won’t show in the list.
- On the plan, Scale out adds instances. Basic lets you set up to 3 by hand. Every app on the plan runs on every instance.
- Scale up changes the tier. Pick Standard S1 to unlock autoscale and deployment slots. The apps restart on the new hardware.
- Now choose Rules Based, then set the instance limits: never fewer than 2, never more than 6.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
The plan is the VMs
An App Service plan is a set of VMs. Every app on the plan runs on every instance. Scale out adds instances (Basic: up to 3). Scale up moves to a bigger or richer tier, which also decides the features you get.
🤔 What happens if…
Read this tour as text
- A registry feeds Container Instances. Azure Container Registry stores your private images. Container Instances runs them as a container group with the CPU and memory you set and a restart policy: Always, OnFailure or Never. It doesn’t scale itself, and only Premium registries can geo-replicate.
- Container Apps scale on HTTP traffic. Each replica gets an allowed CPU and memory pair (0.5 vCPU with 1 Gi here). An HTTP scale rule adds a replica per 50 concurrent requests, between min and max replicas. With min 0, a quiet app scales to zero.
- The plan is the VMs. An App Service plan is a set of VMs. Every app on the plan runs on every instance. Scale out adds instances (Basic: up to 3). Scale up moves to a bigger or richer tier, which also decides the features you get.
- Autoscale rules (Standard and up). On Standard or Premium, a rules-based autoscale setting watches a metric such as CPU Percentage and adds or removes instances between a minimum and maximum, with a cool-down so it doesn’t flap.
- Prove you own the domain. To map www.contoso-learn.com, App Service needs a TXT record asuid.www holding the app’s verification ID, plus a CNAME from www to the app (an A record for the root domain). Free tier can’t do custom domains.
- Certificate, HTTPS Only, TLS 1.2. A free App Service managed certificate (Basic and up, no wildcards, not exportable) is bound with SNI SSL. HTTPS Only redirects HTTP, and the minimum TLS version (1.2 by default) turns away old clients.
- Back up to your own storage. Automatic backups run hourly with no setup. Custom backups write files, configuration and linked databases (up to 10 GB) to a blob container you own, on demand or on a schedule with retention. Basic tier and up.
- Outbound and inbound are different switches. VNet integration is outbound: the app reaches private resources through a delegated subnet. Inbound is controlled by access restrictions (allow and deny rules by priority) or a private endpoint.
- Staging slot, warm-up, swap. A deployment slot (Standard: 5, Premium v3: 20) is a live copy of the app. Deploy to staging, then swap: App Service warms staging up first, so users never hit a cold start. Slot settings stay with their slot.
Contoso Shop runs on a small Basic plan. Black Friday is coming. Scale it by hand, find out what Basic can't do, then move to Standard for autoscale and a staging slot you can swap into production with no downtime.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Black Friday is coming and the shop runs on one small instance.
😊 THE SOLUTION
Pick the right plan tier, then scale out with autoscale rules.
- One busy instance✓ Scale out
- Missing features✓ Scale up a tier
- Nobody watching at 3 AM✓ Autoscale rules
Start with a question
Is it the shop that's busy, or the building it's in?
Picture a food court. Several stalls share one building, one electricity bill and one set of kitchens. If the whole food court gets crowded, you can move to a bigger building (more power per kitchen) or open more identical kitchens next door.
An App Service plan is the building. The web apps are the stalls inside it. Moving to a bigger building is scale up. Opening more kitchens is scale out. And because the stalls share the building, everything you do to it happens to all of them.
Explain it like I’m 10
The technical explanation
Provision an App Service plan
Portal: search App Service plans → + Create. On Basics: subscription, resource group, Name, Operating System (Linux or Windows), Region and Pricing plan (select Explore pricing plans to compare). Zone redundancy needs Premium v2 or v3. Review + create.
az appservice plan create -g rg-admin-web -n asp-contoso-shop --sku B1 --is-linux --number-of-workers 1
New-AzAppServicePlan -ResourceGroupName rg-admin-web -Name asp-contoso-shop -Location eastus -Tier Basic -WorkerSize Small -NumberofWorkers 1 -Linux
What each tier gives you
| Tier | Max instances | Autoscale | Deployment slots | Custom domain + TLS | Notes |
|---|---|---|---|---|---|
| Free (F1) | 1 (shared) | No | No | No | 60 CPU minutes a day, for tests |
| Shared (D1) | 1 (shared) | No | No | Domain only, no TLS binding | Windows only |
| Basic (B1–B3) | 3 | No (manual) | No | Yes | Backups, VNet integration |
| Standard (S1–S3) | 10 | Yes | 5 | Yes | Daily backups |
| Premium v3 (P0v3–P5mv3) | 30 | Yes, plus automatic scaling | 20 | Yes | Zone redundancy, bigger sizes |
| Isolated v2 (I1v2–I6v2) | 100 | Yes | 20 | Yes | Runs in an App Service Environment |
As a feel for cost, Basic B1 is about $13 a month per instance, Standard S1 about $73 and Premium v3 P1v3 about $124 (illustrative Linux prices).
Create an App Service (web app)
Portal: search App Services → + Create → Web App. Basics: Name (becomes <name>.azurewebsites.net), Publish (Code or Container), Runtime stack, Operating System, Region, then the Linux/Windows Plan and Pricing plan. The plan list only shows plans in the same region and OS. The other tabs cover Database, Deployment (GitHub Actions), Networking, Monitor + secure (Application Insights) and Tags.
az webapp create -g rg-admin-web -p asp-contoso-shop -n app-contoso-shop01 --runtime PYTHON:3.12
New-AzWebApp -ResourceGroupName rg-admin-web -Name app-contoso-shop01 -Location eastus -AppServicePlan asp-contoso-shop
Scale up and scale out
Both live on the plan, and you can reach them from the plan or from any app on it: Scale up (App Service plan) and Scale out (App Service plan).
# scale out by hand (Basic allows up to 3)
az appservice plan update -g rg-admin-web -n asp-contoso-shop --number-of-workers 3
# scale up to Standard to unlock autoscale and slots
az appservice plan update -g rg-admin-web -n asp-contoso-shop --sku S1
Set-AzAppServicePlan -ResourceGroupName rg-admin-web -Name asp-contoso-shop -Tier Standard -NumberofWorkers 2
Scaling up moves the apps onto new instances, so they restart. Scaling out adds instances behind the built-in load balancer and leaves the running ones alone.
Autoscale rules
In Scale out (App Service plan) the Scale out method has three choices: Manual, Automatic (platform-managed HTTP scaling on Premium v2/v3) and Rules Based (an Azure Monitor autoscale setting). For rules you set:
- Instance limits: minimum, maximum and default (used if metrics are missing).
- Scale-out rule: for example CPU Percentage > 70 averaged over 10 minutes → increase count by 1, cool down 5 minutes.
- Scale-in rule: for example CPU Percentage below 30 → decrease count by 1. Always pair them.
az monitor autoscale create -g rg-admin-web --resource asp-contoso-shop \
--resource-type Microsoft.Web/serverfarms --name asp-contoso-shop-autoscale \
--min-count 2 --max-count 6 --count 2
az monitor autoscale rule create -g rg-admin-web --autoscale-name asp-contoso-shop-autoscale \
--condition "CpuPercentage > 70 avg 10m" --scale out 1
az monitor autoscale rule create -g rg-admin-web --autoscale-name asp-contoso-shop-autoscale \
--condition "CpuPercentage < 30 avg 10m" --scale in 1
Other useful plan metrics are Memory Percentage and Http Queue Length. You can also add a schedule profile, such as 4 instances every weekday from 08:00 to 18:00.
Architect level How many apps per plan?
There’s no fixed number. Put apps on the same plan when they’re small, owned by the same team and scale together; it saves money. Split them when one app’s load would starve the others, when they need different tiers or regions, or when you want separate bills. Remember a deployment slot is also an app on the plan and uses the same instances.
Real-world business scenario
Contoso Shop (fictional)
- The problem
- The online shop ran on one Basic B1 instance. Every sale weekend the site slowed down and someone had to scale it by hand late at night.
- What they used
- The plan was scaled up to Standard S1 and given a rules-based autoscale setting: minimum 2, maximum 6, add one instance when CPU averages over 70% for 10 minutes, remove one under 30%, plus a weekend schedule profile starting at 4 instances.
- Why that choice
- Standard is the lowest tier with autoscale and slots, two instances give basic redundancy, and the scale-in rule keeps the bill from staying high after the rush.
- The result
- The last sale weekend peaked at 5 instances with steady response times, and nobody was paged.
When to use it and when not to
✓ Use it when…
- Web apps and APIs that need a managed platform with TLS, slots and backups.
- Steady or predictable traffic where a few always-on instances make sense.
- Several small apps that can share one plan and one bill.
✕ Think twice when…
- Workloads that sit idle most of the day and should cost nothing then. Container Apps scales to zero.
- Short jobs that run and stop. Use Container Instances or Functions.
- Software that needs full control of the OS. Use a VM.
↔ Alternatives to consider
- Azure Container Apps for containers that scale on traffic, down to zero.
- Azure Functions for event-driven code billed per execution.
- Virtual Machine Scale Sets when you need the OS and autoscale together.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between an App Service plan and a web app?
Model answer
The plan is the hardware: a set of VMs with a tier and an instance count. The web app is my code or container running on that plan. Several apps can share one plan, and they all share its instances and its bill.
Intermediate When do you scale up and when do you scale out?
Model answer
I scale up when each instance is too small, for example memory runs out, or when I need a feature the tier doesn't have, like deployment slots on Basic. I scale out when the load is many requests that can be shared, so more copies help. Autoscale only works on scale out, and only from Standard up.
Experienced developer How would you set up autoscale for an App Service plan?
Model answer
In Scale out I'd pick Rules Based, set minimum, maximum and default instance counts, then add a scale-out rule such as CPU Percentage greater than 70% averaged over 10 minutes, increase by 1, cool down 5 minutes, and a matching scale-in rule like CPU below 30%, decrease by 1. Without the scale-in rule the plan grows and never shrinks. In the CLI that's az monitor autoscale create with --resource-type Microsoft.Web/serverfarms, then az monitor autoscale rule create.
Scenario One noisy app on a shared plan slows the others down. What do you do?
Model answer
Scaling the plan would scale every app on it, which wastes money on the quiet ones. I'd move the noisy app to its own App Service plan in the same region, then size and scale that plan for it alone.
Quick revision
Key points
- The plan is the compute. Region, OS and tier are set on the plan; the web app runs on it.
- Basic scales out by hand to 3 instances. Standard allows 10 and autoscale. Premium v3 allows 30.
- Standard gives 5 deployment slots, Premium v3 gives 20. Custom domains with TLS start at Basic.
- Scaling acts on the plan, so every app on the plan scales together.
- Rules-based autoscale needs a minimum, a maximum, a default and pairs of scale-out and scale-in rules.
Important terminology
- App Service plan
- The compute behind App Service apps. A region, an OS, a pricing tier and a number of instances, shared by every app on the plan.
- Pricing tier
- The plan's SKU family (Free, Shared, Basic, Standard, Premium v3, Isolated v2) that sets instance size, instance limits and features.
- Scale up
- Moving the plan to a bigger size or a higher tier. Vertical scaling.
- Scale out
- Adding instances to the plan. Horizontal scaling.
- Autoscale setting
- An Azure Monitor resource that changes a plan's instance count between a minimum and maximum, based on rules or a schedule.
- Cool down
- How long autoscale waits after a scale action before it can act again, so it doesn't flap.
- Automatic scaling
- A platform-managed scale-out option on Premium v2 and v3 plans that reacts to HTTP traffic without rules.
Common mistakes
- Trying to add autoscale or slots on a Basic plan.
- Writing only a scale-out rule, so the plan never shrinks.
- Creating the web app in a different region from the plan you meant to use.
Exam tips
- "Scale automatically on CPU" = Standard or higher with an autoscale rule.
- "More CPU and memory per instance" = scale up.
- "Minimise cost for a dev site with no custom domain" = Free (F1).
Five quick revision questions
-
1.How many instances can a Basic plan run?Show
Up to 3, scaled manually.
-
2.Which is the lowest tier with autoscale?Show
Standard.
-
3.How many deployment slots does Premium v3 allow?Show
20.
-
4.Which command changes a plan's tier?Show
az appservice plan update --sku <SKU>.
-
5.Which resource type do you autoscale for App Service?Show
Microsoft.Web/serverfarms (the plan).
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: App Service Custom Domains, Certificates and TLS
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.