Module 2 Beginner to Intermediate AZ-204 AZ-900 18 min read

Azure App Service

Azure App Service is Microsoft's fully managed platform for building, deploying, and scaling web applications, REST APIs, and mobile backends — without worrying about the underlying infrastructure. It's one of the most popular and powerful PaaS services in Azure.

What you'll learn: What App Service is · Supported languages & runtimes · App Service Plans · Creating a web app · Deployment methods · Auto-scaling · Custom domains & SSL · Deployment slots · Monitoring · Pricing · Best practices · AZ-204 exam tips
In this tutorial
What is Azure App Service?
Supported languages and runtimes
App Service Plans
Creating a web app
Deployment methods
Auto-scaling
Deployment slots
Custom domains and SSL
Monitoring and diagnostics
Pricing
Best practices
AZ-204 exam tips

What is Azure App Service?

Azure App Service is a fully managed Platform as a Service (PaaS) offering that lets you host web applications, REST APIs, and mobile backends in the cloud. The key word is fully managed — Microsoft handles the operating system, web server software, security patches, load balancing, and infrastructure. You focus exclusively on your application code.

This is the fundamental difference between App Service and Virtual Machines. With VMs you manage everything from the OS upwards. With App Service you just deploy your code and Azure handles the rest.

💡 Real world analogy: App Service is like renting a fully managed restaurant kitchen. The building, equipment, cleaning, and maintenance are all handled. You just bring your recipes (code) and cook (deploy). With VMs, you'd have to build and maintain the kitchen yourself.

Supported languages and runtimes

App Service supports a wide range of programming languages and frameworks — you don't need to change your technology stack to use it:

1
.NET and .NET Core — Microsoft's own framework. ASP.NET Core apps run natively and are extremely well supported. Best performance on App Service.
2
Node.js — JavaScript runtime for server-side apps. Popular for REST APIs, real-time apps, and microservices built with Express.js, Fastify, or NestJS.
3
Python — Supports Django, Flask, and FastAPI. Widely used for web apps, data science APIs, and machine learning model serving.
4
Java — Supports Java SE, Tomcat, and JBoss EAP. Popular in enterprise environments for Spring Boot applications.
5
PHP — Supports PHP 8.x. Great for WordPress, Laravel, and other PHP-based web applications.
6
Ruby — Supports Ruby on Rails applications on Linux App Service plans.
7
Custom containers — Deploy any language or framework using Docker containers. If your runtime isn't listed above, containerise it and run it on App Service.

App Service Plans

An App Service Plan defines the compute resources (CPU, RAM, disk) that your app runs on and determines what features are available. Think of it as the hardware specification for your web app.

Multiple apps can share the same App Service Plan — they run on the same underlying compute resources. This is a great way to save cost when running multiple small apps.

1
Free (F1) — 60 minutes CPU per day, 1 GB storage, shared infrastructure. No custom domains, no SSL, no auto-scaling. Good only for learning and testing.
Cost: Free
2
Shared (D1) — More CPU minutes, custom domains. Still on shared infrastructure. Not suitable for production.
Cost: ~$10/month
3
Basic (B1, B2, B3) — Dedicated compute, custom domains, SSL. No auto-scaling. Good for low-traffic production apps and dev/test environments.
Cost: From ~$13/month
4
Standard (S1, S2, S3) — Dedicated compute, auto-scaling (up to 10 instances), deployment slots (5 slots), custom domains, SSL. The most popular tier for production apps.
Cost: From ~$56/month
5
Premium (P1v3, P2v3, P3v3) — More powerful compute, up to 30 auto-scale instances, 20 deployment slots, VNet integration, private endpoints. Best for high-traffic enterprise apps.
Cost: From ~$111/month
6
Isolated (I1v2, I2v2, I3v2) — Runs in your own dedicated Azure Virtual Network. Highest security and isolation. Required for compliance-heavy industries like banking and healthcare.
Cost: From ~$500+/month

Creating a web app

1
Go to portal.azure.com → Search "App Services" → Click "+ Create""Web App"
2
Basics tab:
• Subscription: Your subscription
• Resource Group: rkc-webapp-rg
• Name: rkc-mywebapp (must be globally unique — becomes your URL)
• Publish: Code (or Docker Container)
• Runtime stack: Choose your language (e.g. Node 20 LTS)
• OS: Linux (cheaper) or Windows
• Region: Central India
3
App Service Plan:
• Click "Create new"
• Name: rkc-app-plan
• Pricing plan: Free F1 for learning
4
Click "Review + Create""Create"
Your web app deploys in about 60 seconds!
5
Once created, click "Go to resource"
Your app is live at: https://rkc-mywebapp.azurewebsites.net
You'll see the default Azure App Service welcome page — ready for your code!
Azure CLI — Create a web app
# Create an App Service Plan
az appservice plan create \
  --name rkc-app-plan \
  --resource-group rkc-webapp-rg \
  --location centralindia \
  --sku F1 \
  --is-linux

# Create the web app
az webapp create \
  --name rkc-mywebapp \
  --resource-group rkc-webapp-rg \
  --plan rkc-app-plan \
  --runtime "NODE:20-lts"

Deployment methods

App Service supports multiple ways to deploy your application code. Choose the one that fits your workflow:

1
GitHub Actions (Recommended) — Connect your GitHub repository and App Service automatically deploys every time you push code to your main branch. Zero manual steps after initial setup.
2
Azure DevOps Pipelines — Enterprise-grade CI/CD pipeline. Build, test, and deploy in a controlled pipeline. Most commonly used in large organisations.
3
ZIP deploy — Package your app as a ZIP file and deploy via Azure CLI or REST API. Simple and fast for quick deployments.
4
FTP/FTPS — Traditional file upload via FTP. Not recommended for production but useful for quick fixes.
5
Local Git — Push code directly from your local machine using Git. App Service provides a Git URL you push to — triggers automatic deployment.
Azure CLI — Deploy code via ZIP
# Deploy a ZIP file to your web app
az webapp deploy \
  --name rkc-mywebapp \
  --resource-group rkc-webapp-rg \
  --src-path ./myapp.zip \
  --type zip

Auto-scaling

Auto-scaling automatically adjusts the number of instances running your app based on demand. This ensures your app stays responsive during traffic spikes and saves money during quiet periods.

1
Scale up (Vertical scaling) — Move to a larger App Service Plan with more CPU and RAM. For example, move from B1 to B2. Quick but has limits.
2
Scale out (Horizontal scaling) — Add more instances of your app. Available from Standard tier upwards. You can set rules like "add 2 instances when CPU > 70% for 10 minutes" and "remove instances when CPU < 30%".
3
Schedule-based scaling — Scale to a specific number of instances at scheduled times. For example, scale to 10 instances every weekday at 9 AM and scale down to 2 at 6 PM.

Deployment slots

Deployment slots are one of the most powerful features of App Service. A slot is a separate instance of your app with its own hostname — like a staging environment that lives inside the same App Service.

1
How slots work: Your production app runs at myapp.azurewebsites.net. You create a staging slot at myapp-staging.azurewebsites.net. Deploy your new version to staging, test it thoroughly, then swap staging and production in seconds.
2
Zero downtime deployments: The swap operation is instant — users on production never experience downtime. If something goes wrong, swap back immediately.
3
Slot settings: Some app settings can be marked as "slot sticky" — they stay with the slot during swaps. This lets staging use a test database while production uses the real database.

Custom domains and SSL

1
Add custom domain: Go to your App Service → "Custom domains""Add custom domain". Enter your domain, Azure gives you a TXT or CNAME record to add to your DNS provider.
2
Free managed SSL certificate: App Service provides free SSL certificates for custom domains (Basic tier and above). Go to "Certificates""Managed certificate" → Azure handles renewal automatically!
3
Enforce HTTPS: In "TLS/SSL settings", enable "HTTPS Only" to automatically redirect all HTTP traffic to HTTPS.

Monitoring and diagnostics

1
Application Insights — Enable this from day one. It gives you real-time performance monitoring, error tracking, request tracing, and user analytics. One of the most valuable Azure monitoring tools.
2
Log stream — View live application logs directly in the Azure Portal or CLI. Invaluable for debugging issues in real time.
3
Diagnose and solve problems — Built-in AI-powered diagnostic tool that automatically identifies common issues with your app and suggests fixes.

Best practices

1
Always use deployment slots for production apps — never deploy directly to production. Always deploy to staging, test, then swap.
2
Store secrets in Azure Key Vault — Never put connection strings, API keys, or passwords directly in your app settings. Reference Key Vault secrets instead.
3
Enable Application Insights from day one — You can't go back in time to see what happened before you enabled monitoring. Turn it on immediately.
4
Use managed identities — Instead of storing credentials to access databases or storage, use managed identities to give your app automatic, credential-free access to other Azure services.
5
Enable health checks — Configure a health check endpoint so App Service automatically removes and replaces unhealthy instances without downtime.

AZ-204 exam tips

✅ Know the App Service Plan tiers and what features each includes (slots, auto-scale, VNet integration)
✅ Understand deployment slots — staging, swap, slot-sticky settings
✅ Know that Free tier (F1) does not support custom domains or SSL
✅ Understand scale up vs scale out — vertical vs horizontal scaling
✅ Know that Standard tier and above support auto-scaling
✅ Remember App Service provides free managed SSL certificates for custom domains
✅ Understand deployment methods — GitHub Actions, ZIP deploy, Local Git
✅ Know that Application Insights is the monitoring tool for App Service
✅ Remember App Service is PaaS — you manage code, Azure manages infrastructure