Azure App Service is Microsoft's fully managed Platform-as-a-Service (PaaS) for hosting web applications, REST APIs, and mobile backends. You bring the code; Azure handles the OS patching, load balancing, auto-scaling, and TLS certificate management. It supports .NET, Node.js, Python, Java, PHP, and Ruby — making it the fastest path from code to a production URL on Azure.
App Service Plans
Every App Service app runs inside an App Service Plan, which defines the underlying compute resources. Think of the plan as the server and the app as the application running on it. Multiple apps can share one plan to reduce costs. Plans come in several tiers:
- Free / Shared: For development and testing. Limited resources, no custom domains, no SLA.
- Basic (B1–B3): Dedicated compute, custom domains, and manual scaling up to 3 instances.
- Standard (S1–S3): Auto-scaling, deployment slots, daily backups, and Traffic Manager integration.
- Premium (P1v3–P3v3): Enhanced performance, VNet integration, up to 30 auto-scale instances.
- Isolated (I1v2–I3v2): Dedicated App Service Environment (ASE) inside your own VNet for compliance-heavy workloads.
For most production web apps, start with Standard S2 and scale based on metrics.
Creating an App Service App
Via the Portal: Navigate to App Services > Create, select your subscription and resource group, enter an app name (becomes appname.azurewebsites.net), choose a runtime stack (e.g., Node 20 LTS), and select or create an App Service Plan.
Via the CLI:
# Create a resource group
az group create --name rg-webapp-demo --location eastus
# Create an App Service Plan (Standard S1, Linux)
az appservice plan create
--name plan-webapp-demo
--resource-group rg-webapp-demo
--sku S1
--is-linux
# Create a Node.js 20 web app
az webapp create
--resource-group rg-webapp-demo
--plan plan-webapp-demo
--name myapp-demo-2026
--runtime "NODE:20-lts"
# Get the default URL
az webapp show
--resource-group rg-webapp-demo
--name myapp-demo-2026
--query defaultHostName -o tsv
Deploying Code
App Service supports multiple deployment methods:
- ZIP Deploy: Package your app as a ZIP and push it with the CLI — fastest for quick deployments.
- GitHub Actions: Connect your repo and auto-deploy on every push to main.
- Azure DevOps Pipelines: Full CI/CD with build, test, and release stages.
- Local Git: Push directly from your local git repository to a remote Azure endpoint.
- FTP/FTPS: Legacy option for simple scenarios.
# ZIP deploy from the current directory
zip -r app.zip . -x "node_modules/*" ".git/*"
az webapp deployment source config-zip
--resource-group rg-webapp-demo
--name myapp-demo-2026
--src app.zip
Deployment Slots
Available on Standard tier and above, deployment slots let you deploy to a staging environment and then swap it to production with zero downtime. The swap is atomic — Azure swaps the routing rules between slots, so if something goes wrong you can swap back instantly.
# Create a staging slot
az webapp deployment slot create
--resource-group rg-webapp-demo
--name myapp-demo-2026
--slot staging
# Deploy to staging first
az webapp deployment source config-zip
--resource-group rg-webapp-demo
--name myapp-demo-2026
--slot staging
--src app.zip
# Swap staging to production
az webapp deployment slot swap
--resource-group rg-webapp-demo
--name myapp-demo-2026
--slot staging
--target-slot production
Application Settings and Environment Variables
Never hardcode connection strings or API keys. Store them as Application Settings in App Service — they are injected as environment variables at runtime and encrypted at rest.
# Set application settings
az webapp config appsettings set
--resource-group rg-webapp-demo
--name myapp-demo-2026
--settings
NODE_ENV=production
DB_CONNECTION_STRING="Server=myserver.database.windows.net;..."
Auto-Scaling
On Standard and Premium plans, configure auto-scale rules based on metrics:
- In the Portal, go to your App Service Plan and select Scale out (App Service plan).
- Choose Custom autoscale and add a rule: scale out when average CPU exceeds 70% for 5 minutes.
- Add a scale-in rule: remove instances when CPU drops below 30% for 10 minutes.
- Set minimum (2) and maximum (10) instance counts.
Custom Domains and TLS
Add a custom domain via App Service > Custom domains > Add custom domain. Verify ownership with a CNAME or TXT record in your DNS provider. Then bind a free App Service Managed Certificate for automatic TLS — Azure renews it before expiry with no action needed on your part.
Key Takeaways
Azure App Service removes infrastructure management from web application deployment. Use deployment slots for zero-downtime releases, application settings for secure configuration, and auto-scale rules to handle traffic spikes automatically. For most web workloads, App Service on a Standard plan gives you production-ready reliability at a fraction of the complexity of managing VMs.