Azure App Service Overview: Managed Web Apps and APIs
Azure App Service is a fully managed platform for hosting web applications, REST APIs, and backend services. You deploy your application code — or a Docker container — and Azure handles the operating system, web server, TLS certificates, load balancing, and autoscaling infrastructure underneath. For most web workloads, App Service removes the operational work that VMs require without sacrificing the flexibility that developers need.
What App Service provides out of the box
When you deploy to App Service, you get a substantial amount of infrastructure managed for you automatically:
- HTTPS and TLS certificates. Every App Service app gets a free managed TLS certificate on its default
*.azurewebsites.netdomain. For custom domains, App Service integrates with Azure-managed certificates (free) or your own certificates stored in Key Vault. - Custom domains. Map your domain name to your app with CNAME or A record pointing, and App Service serves traffic on that domain with HTTPS.
- Auto-scaling. Scale out to more instances based on CPU, memory, HTTP queue length, or a schedule. App Service handles load balancing across instances automatically.
- Deployment slots. Run a staging version of your app alongside production. Swap between production and staging with a single click, with no downtime. The swap is instant — traffic routing flips without restarting either environment.
- Continuous deployment integration. Connect directly to GitHub, Azure DevOps, or Bitbucket. Every push to a branch automatically deploys to App Service.
- Diagnostic logging. Application logs, web server logs, detailed error messages, and failed request traces — all configurable without touching the OS.
- Managed identities. App Service apps can use a managed identity to authenticate to other Azure services (Key Vault, databases, storage) without storing credentials in app settings.
App Service Plans: tiers and what they mean
An App Service Plan is the compute resource your apps run on. The plan determines the region, VM size, number of instances, and the features available. Multiple apps can share one plan — they all run on the same underlying instances.
| Tier | Best for | Key features | Scaling |
|---|---|---|---|
| Free / Shared | Learning, hobby projects | Shared infrastructure, no custom domain SSL | None |
| Basic (B1/B2/B3) | Development, low-traffic sites | Dedicated VMs, custom domains | Manual only (up to 3 instances) |
| Standard (S1/S2/S3) | Production web apps | Autoscaling, deployment slots (5), backups | Autoscale (up to 10 instances) |
| Premium (P1v3/P2v3/P3v3) | High-traffic production | Faster VMs, 20 deployment slots, VNet integration | Autoscale (up to 30 instances) |
| Isolated (I1v2/I2v2/I3v2) | Regulated industries, compliance | Dedicated VNet, private network, FIPS compliance | Autoscale (up to 100 instances) |
Most production web applications run on Standard or Premium tier. Standard S1 is a common starting point for small to medium apps — it includes autoscaling, deployment slots, and dedicated compute. Upgrade to Premium when you need better VM performance, more slots, or VNet integration for private database access.
Ways to deploy to App Service
ZIP deploy
Package your application as a ZIP file and push it to App Service. Fastest for simple deploys where your build artifact is a directory of files:
# Deploy a ZIP package to App Service
az webapp deployment source config-zip \
--resource-group my-rg \
--name my-web-app \
--src ./app.zipGitHub Actions continuous deployment
Connect your App Service to a GitHub repository and choose a branch. Azure generates a GitHub Actions workflow file that builds and deploys on every push:
# Connect GitHub to App Service (triggers GitHub Actions workflow generation)
az webapp deployment source config \
--resource-group my-rg \
--name my-web-app \
--repo-url https://github.com/myorg/myapp \
--branch main \
--manual-integrationContainer image deploy
If your application is packaged as a Docker image, App Service can pull it from Azure Container Registry and run it directly. This is useful for polyglot applications or apps with complex dependencies that are easier to manage in a container:
# Configure App Service to use a container image from ACR
az webapp config container set \
--resource-group my-rg \
--name my-web-app \
--docker-custom-image-name myacr.azurecr.io/myapp:latest \
--docker-registry-server-url https://myacr.azurecr.ioConfiguration and environment variables
App Service exposes application settings as environment variables to your app at runtime. Set them through the portal or CLI:
# Set environment variables for the app
az webapp config appsettings set \
--resource-group my-rg \
--name my-web-app \
--settings \
NODE_ENV=production \
API_ENDPOINT=https://api.example.com \
LOG_LEVEL=infoFor secrets like database passwords or API keys, use Key Vault references instead of plain-text app settings. A Key Vault reference looks like @Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/db-password/) as the value of an app setting. App Service fetches the secret from Key Vault at startup and provides it as an environment variable — without storing the value in App Service configuration.
Application settings in App Service are encrypted at rest and in transit. However, they appear in plaintext in the portal and deployment templates. For anything sensitive, use a Key Vault reference. See Azure Key Vault overview for how to set this up.
Deployment slots: zero-downtime releases
Deployment slots are separate versions of your app running alongside each other under the same App Service Plan. The most common pattern is two slots: production and staging.
Your CI/CD pipeline deploys to the staging slot. Warm-up traffic hits staging. Once you confirm it is healthy — by running smoke tests or checking Application Insights — you swap staging to production. The swap is instant: App Service switches the routing configuration, so traffic that was hitting staging now hits production and vice versa. No restart, no downtime.
# Create a staging slot
az webapp deployment slot create \
--resource-group my-rg \
--name my-web-app \
--slot staging
# Swap staging to production when ready
az webapp deployment slot swap \
--resource-group my-rg \
--name my-web-app \
--slot staging \
--target-slot productionSlots also support “sticky settings” — app settings that do not swap with the slot. Use sticky settings for slot-specific configuration like connection strings or environment names that should stay with each slot rather than moving to production when you swap.
Common App Service mistakes
- Putting production and staging apps on the same plan at Free or Shared tier. Free tier apps share infrastructure with other customers, have no SLA, and cannot use deployment slots. Move production apps to at least Standard tier to get autoscaling, slot support, and dedicated compute.
- Storing secrets in plain-text app settings. App settings are visible in the Azure portal to anyone with Contributor access to the resource group. Use Key Vault references for database passwords, API keys, and connection strings.
- Not configuring health check. Without a health check endpoint, App Service does not know whether your application is actually responding. Configure a health check path under App Service > Health Check — App Service will route traffic away from instances that fail the health check and restart them.
- Deploying directly from a local machine to production. Set up a CI/CD pipeline (GitHub Actions, Azure Pipelines) that deploys to staging first. Direct-to-production deploys without a staging gate skip smoke testing and make rollback harder.
Summary
- App Service hosts web apps, APIs, and backend services on managed infrastructure — no OS patching, no web server configuration, no TLS management.
- The App Service Plan defines the compute tier. For production apps, start with Standard S1 and move to Premium for VNet integration or higher throughput.
- Deployment slots (Standard tier and above) enable zero-downtime releases: deploy to staging, test, then swap to production instantly.
- Use Key Vault references for sensitive app settings instead of plain-text values visible in the portal.
- Multiple apps can share one App Service Plan to reduce cost — as long as the combined load fits on the plan’s compute instances.
Frequently asked questions
What languages does Azure App Service support?
App Service supports .NET, .NET Framework, Java, Node.js, Python, PHP, and Ruby on Linux. Windows-based App Service plans also support older ASP.NET versions and classic ASP. You can also deploy any language by packaging it as a Docker container and deploying the container image to App Service.
How is App Service different from a VM running a web server?
App Service abstracts the OS, web server, and runtime. You deploy code or a container image — Microsoft handles OS patching, TLS certificate renewal, auto-scaling infrastructure, and high availability. On a VM, you install and manage all of that yourself. App Service is faster to set up, cheaper to operate for most web workloads, and more reliable out of the box.
What is an App Service Plan?
An App Service Plan is the underlying compute resource — it specifies the region, number of instances, and VM size. All apps in the same plan share the same compute. You can run multiple apps on one plan to reduce cost. The plan is what you pay for, not the individual apps. The Free and Shared tiers run apps on shared infrastructure; Standard and above give you dedicated VMs.