Azure App Service
Host web apps without managing servers: choose a plan, scale, deploy safely with slots, add custom domains and TLS, back up and connect to networks.
In this lesson you'll learn
- App Service plans and what each tier unlocks
- Scale up versus scale out, and autoscale
- Deployment slots and swapping
- Custom domains, certificates, backups and networking
1. Apps and plans
New to App Service? Start here
App Service runs websites and APIs written in .NET, Java, Node.js, Python or PHP, or in a container, without you patching servers. Apps run on an App Service plan, which is the set of VMs you pay for. Several apps can share one plan.
| Tier | Custom domain and TLS | Scale out | Deployment slots | Use |
|---|---|---|---|---|
| Free, Shared | Limited | No | No | Learning and testing |
| Basic | Yes | Manual, up to 3 | No | Low traffic sites |
| Standard | Yes | Autoscale, up to 10 | 5 | Production |
| Premium v3 | Yes | Autoscale, up to 30 | 20 | Busy production |
| Isolated | Yes | Up to 100 | 20 | Dedicated environment in your VNet |
Scale up means a bigger tier or instance size. Scale out means more instances. Autoscale rules work like scale set rules: pair scale-out with scale-in.
2. Deployment slots
- Problem after release? Swap again. It is the fastest rollback.
- Slot settings (marked "deployment slot setting") stay with the slot, such as a staging database connection string.
- Swap with preview applies production settings to staging first so you can test. Auto swap swaps after every deployment.
3. Custom domains and TLS
- Create the DNS records first: a CNAME for subdomains like www, or an A record for the root domain, plus a TXT record named asuid that proves ownership.
- Add the custom domain to the app.
- Add a TLS certificate: a free App Service managed certificate, one from Key Vault, or an uploaded certificate.
- Create the binding, and turn on HTTPS only.
4. Backup and networking
- Backup saves app content and configuration, optionally with a linked database. It needs the Basic tier or higher. Custom backups go to your own storage account on a schedule you choose.
- Access restrictions allow or deny inbound traffic by IP range or subnet.
- Private endpoint makes the app reachable only on a private IP (inbound).
- VNet integration lets the app call resources inside a VNet, such as a database VM (outbound).
Exam focus
Inbound privately = private endpoint. Outbound into a VNet = VNet integration. Least privilege for developers who deploy = Website Contributor on the app.
Example
SS Kaiser deploys a new checkout page to staging on Thursday, tests it with real settings using swap with preview, and swaps it live at 6 am. A payment bug appears at 9 am. One swap puts the old checkout back in seconds while the developers fix it.
Exam traps to remember
- Slots and autoscale start at the Standard tier.
- Create DNS records before adding a custom domain.
- The fastest rollback after a bad swap is another swap, not a restore.
- Moving an app to another resource group does not change the plan's region.
Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-104 Azure Administrator app.
Practise in the app