Top 20 Azure App Service Interview Questions and Answers
- What is Azure App Service?
- What is an App Service Plan and what are its pricing tiers?
- What is the difference between Azure App Service and Azure Virtual Machines?
- How do you deploy applications to Azure App Service?
- What are deployment slots in Azure App Service?
- How does auto-scaling work in Azure App Service?
- What is Azure App Service Environment (ASE)?
- How do you configure custom domains and SSL certificates?
- What are WebJobs in Azure App Service?
- How do you implement authentication in Azure App Service?
- What is the difference between continuous and triggered WebJobs?
- How do you configure application settings and connection strings?
- What is VNET Integration in Azure App Service?
- How do you enable and view application logs?
- What is Azure App Service Hybrid Connections?
- How do you implement CI/CD for Azure App Service?
- What are health checks in Azure App Service?
- How do you handle traffic routing between deployment slots?
- What is the difference between Azure App Service Web Apps and Functions?
- How do you configure backup and restore for App Service?
Microsoft Azure Interview Questions
Comprehensive interview questions for Azure cloud services and data engineering roles.
1. What is Azure App Service?
Azure App Service is a fully managed Platform as a Service (PaaS) offering from Microsoft Azure for hosting web applications, REST APIs, mobile backends, and serverless code. It abstracts the underlying infrastructure, allowing developers to focus on application development.Key Features:
- Multiple Language Support: .NET, .NET Core, Java, Ruby, Node.js, PHP, Python
- Built-in DevOps: CI/CD integration with Azure DevOps, GitHub, Bitbucket
- Global Scale: High availability with SLA up to 99.95%
- Security: ISO, SOC, PCI DSS compliant with built-in authentication
- Enterprise Features: Custom domains, SSL, hybrid connectivity
Types of Apps Supported:
- Web Apps (websites and web applications)
- API Apps (RESTful APIs)
- Mobile Apps (mobile backend services)
- Logic Apps (workflow automation)
- Function Apps (serverless code execution)
2. What is an App Service Plan and what are its pricing tiers?
An App Service Plan defines the compute resources allocated to run your App Service applications. It determines the region, number of VM instances, size of instances, and pricing tier.Pricing Tiers:
Free and Shared (Dev/Test):
- Shared infrastructure with other customers
- Limited compute minutes (Free: 60 min/day, Shared: 240 min/day)
- No custom domains (Free) or limited custom domains
- No SLA provided
Basic (B1, B2, B3):
- Dedicated VM instances
- Manual scaling up to 3 instances
- Custom domains and SSL supported
- Best for: Development and testing
Standard (S1, S2, S3):
- Auto-scaling up to 10 instances
- Deployment slots (5 slots)
- Daily backups
- Best for: Production workloads
Premium (P1v2, P2v2, P3v2, P1v3, P2v3, P3v3):
- Enhanced performance and scale
- Up to 30 instances with auto-scale
- 20 deployment slots
- VNET Integration
- Best for: Enterprise production
Isolated (I1, I2, I3):
- Dedicated App Service Environment (ASE)
- Network isolation in customer's VNET
- Up to 100 instances
- Best for: High security/compliance requirements
3. What is the difference between Azure App Service and Azure Virtual Machines?
| Aspect | Azure App Service (PaaS) | Azure VMs (IaaS) |
|---|---|---|
| Management | Platform managed - no OS patching required | Full control - manual OS management |
| Scaling | Built-in auto-scaling | Manual or VM Scale Sets |
| Deployment | Multiple easy deployment options | Manual deployment and configuration |
| Cost | Generally lower TCO | Higher due to management overhead |
| Customization | Limited to platform capabilities | Full customization possible |
| Use Case | Web apps, APIs, modern applications | Legacy apps, full control needs |
When to choose App Service:
- Standard web frameworks and languages
- No need for OS-level access
- Want to minimize operational overhead
- Need quick deployment and scaling
When to choose VMs:
- Legacy applications with specific dependencies
- Need full control over the operating system
- Applications requiring specific software installations
- Custom networking requirements
4. How do you deploy applications to Azure App Service?
Azure App Service supports multiple deployment methods:1. Azure DevOps / GitHub Actions:
# GitHub Actions workflow
name: Deploy to Azure Web App
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: 'my-web-app'
publish-profile: [null]
package: '.'
2. Azure CLI:
# Deploy from local folder az webapp up --name my-web-app --resource-group myRG --runtime "PYTHON:3.9" # Deploy from ZIP az webapp deployment source config-zip --resource-group myRG \ --name my-web-app --src app.zip
3. FTP/FTPS:
- Get FTP credentials from Azure Portal
- Upload files directly to /site/wwwroot
4. Local Git:
- Enable local Git in Deployment Center
- Push to Azure remote repository
5. Container Deployment:
- Deploy Docker containers from ACR or Docker Hub
5. What are deployment slots in Azure App Service?
Deployment slots are live apps with their own hostnames that allow you to deploy and test changes before swapping to production.Benefits:
- Zero-downtime deployments
- Warm-up instances before swap
- Easy rollback by swapping back
- A/B testing capabilities
Slot-specific vs Swap Settings:
// Slot-specific settings (NOT swapped): - Connection strings marked as "slot setting" - App settings marked as "slot setting" - Custom domain bindings - SSL certificates // Settings that ARE swapped: - Application code - App settings (not marked slot-specific) - Handler mappings - Public certificates
Common Workflow:
# Create staging slot az webapp deployment slot create --name my-web-app \ --resource-group myRG --slot staging # Deploy to staging az webapp deployment source config-zip --name my-web-app \ --resource-group myRG --slot staging --src app.zip # Swap staging to production az webapp deployment slot swap --name my-web-app \ --resource-group myRG --slot staging --target-slot production