azureblog.co.uk
← AZ-104 study plan
AZ-104 · Deploy and manage Azure compute resources

Create and configure Azure App Service

Pick an App Service plan, scale it, add custom domains and TLS, back up apps, connect them to networks and release safely with deployment slots.

  • 22 min
  • 8 concepts
  • Try it yourself
  • 5-question check

Learn

Azure App Service hosts web apps, APIs and mobile back ends as platform as a service. Microsoft patches the OS and runtime; you deploy code or a container.

Every app runs in an App Service plan, which defines the region, the number and size of VM instances, and the pricing tier. The tier decides which features you get.

  1. 1

    Provision an App Service plan

    Tiers fall into three groups. Shared (Free and Shared) runs on VMs shared with other customers. Dedicated (Basic, Standard, Premium v3 and v4) runs on VMs only your plan uses. Isolated v2 runs in an App Service Environment inside your own virtual network.

    Several apps can share one plan and its instances. Move an app to its own plan if it competes with others for resources.

    Remember: You pay for the plan's instances, not per app.

  2. 2

    Configure scaling for an App Service plan

    Scale up means a higher tier or bigger instances. Scale out means more instances, either manually or with autoscale rules on metrics or a schedule.

    Free and Shared can't scale out. Autoscale starts at Standard. All apps in a plan scale together.

    Remember: Scale up = bigger. Scale out = more.

  3. 3

    Create an App Service

    When you create a web app you choose code or container, the runtime stack and version, the OS (Windows or Linux), the region and the plan.

    Deploy from GitHub Actions, Azure DevOps, a ZIP file, FTP or a container registry. Application settings and connection strings are exposed to the app as environment variables.

    Remember: Keep secrets in Key Vault and use Key Vault references in app settings.

  4. 4

    Configure certificates and Transport Layer Security (TLS) for an App Service

    Every app gets HTTPS on its default azurewebsites.net name. For a custom domain you can use a free App Service managed certificate, a certificate from Key Vault, or upload your own.

    Turn on HTTPS Only to redirect HTTP to HTTPS, and set the minimum TLS version. SNI-based TLS bindings are free; IP-based bindings may cost extra.

    Remember: Custom domains and TLS bindings need Basic or higher.

  5. 5

    Map an existing custom DNS name to an App Service

    For a subdomain such as www.contoso.com, create a CNAME pointing to the app's azurewebsites.net name. For the root domain, create an A record pointing to the app's IP.

    App Service also needs a TXT record (asuid) with the domain verification ID to prove you own the domain.

    Remember: Subdomain: CNAME. Root domain: A record. Both: TXT for verification.

  6. 6

    Configure backup for an App Service

    App Service can back up the app's content, configuration and, optionally, a linked database. Automatic backups are included in Basic and higher; custom backups to your own storage account can be scheduled.

    You can restore to the same app, another app or a deployment slot.

    Remember: Backups need a supported tier; Free and Shared don't include them.

  7. 7

    Configure networking settings for an App Service

    Inbound: access restrictions (IP and service endpoint rules) and private endpoints control who can reach the app. Outbound: VNet integration lets the app reach resources in a virtual network, such as a database behind a private endpoint.

    Hybrid connections let an app reach a specific host and port on-premises through a relay.

    Remember: Private endpoint is for traffic coming in. VNet integration is for traffic going out.

  8. 8

    Configure deployment slots for an App Service

    Deployment slots are live apps with their own host names, such as a staging slot. Deploy to staging, warm it up and test it, then swap it with production for a release without downtime. Swap back if something goes wrong.

    Settings marked as deployment slot settings stay with the slot instead of moving during a swap. Slots start at the Standard tier, with more slots on Premium.

    Remember: Swap = zero-downtime release and instant rollback.

A release with deployment slots

  1. Deploy to stagingNew code goes to the staging slot, not production.
  2. Warm up and testStaging runs with its own URL and slot settings.
  3. SwapStaging and production swap, with no downtime.
  4. Roll back if neededSwap again to put the old version back.

Try it

What does the app need? Answer to find the lowest App Service tier that fits.

This interactive part needs JavaScript.

In the portal

  • Scale up the planAzure portal: App Services > your app > Settings > Scale up (App Service plan)
  • AutoscaleAzure portal: App Services > your app > Settings > Scale out (App Service plan)
  • Custom domainsAzure portal: App Services > your app > Settings > Custom domains
  • Deployment slotsAzure portal: App Services > your app > Deployment > Deployment slots
  • VNet integration and private endpointsAzure portal: App Services > your app > Settings > Networking

Key terms

Click a card to see the definition.

Check your understanding

5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.

  1. What's the lowest tier with deployment slots?

  2. Which DNS record maps www.contoso.com to an app?

  3. An app must call a SQL database that's only reachable through a private endpoint in a VNet. What do you configure on the app?

  4. A setting must stay in staging and not move to production during a swap. What should you do?

  5. What does scaling out an App Service plan do?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.