Azure App Service

AZ-104 Azure AdministratorComputeAbout 25 minutesBy Cloud Hands On

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

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.

TierCustom domain and TLSScale outDeployment slotsUse
Free, SharedLimitedNoNoLearning and testing
BasicYesManual, up to 3NoLow traffic sites
StandardYesAutoscale, up to 105Production
Premium v3YesAutoscale, up to 3020Busy production
IsolatedYesUp to 10020Dedicated environment in your VNet
Remember Standard: it is the cheapest tier with both deployment slots and autoscale.

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

Staging slot with v2 swaps with production slot running v1. After the swap, v1 sits in staging ready for rollback. Before swapAfter swap Production slotv1 Staging slot (tested)v2 Production slotv2 Staging slotv1, ready to swap back swap
Swaps are instant and the staging slot is warmed up first, so users see no downtime.
  • 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

  1. 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.
  2. Add the custom domain to the app.
  3. Add a TLS certificate: a free App Service managed certificate, one from Key Vault, or an uploaded certificate.
  4. 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

Keep going