Introduction
A managed platform for deploying and scaling web apps.
Types
Web App
Mobile Apps
Azure Notification Hub
Platform independent
Offline sync
Track
Activities
Crash reports
Api apps
CORS
Level
Code
App Service
Documentation
Swagger
OpenAPI
App Service Plans
Set of virtual server resources that run App Service apps
A single App Service plan can host multiple App Service web apps
Unit of billing apart from bandwidth
Based on a current limitation, for the same resource group you cannot mix Windows and Linux apps in the same region.
Types
Shared
No scale-out
Shared by all customers
Dedicated
Only apps in the same App Service plan share the same compute resources
Isolated
Runs on dedicated Azure VMs on dedicated Azure virtual networks
Network isolation
Compute isolation
When?
Resource intensive apps
Independant scaling
Regional requirments
Deployment
CI/CD
Git
DevOps
Github
Bitbucket
Etc..
Storage
Dropbox
Onedrive
Manual
Git
App service as a remote repository
Kudu - Kudu is the platform is in charge of the Git deployments in Azure app service
az webapp up
Packages the app and deploys
Creates a new instance if not exist
FTP/S
IDE
Visual Studio
Visual Code
ZIP or WAR
az webapp deployment source config-zip
REST APIs
ARM
Scaling
Why
remain responsive during high demand
reducing the resources in low demand and save money
Types
Per-app Scaling
Scaling an app independently from the App Service plan that hosts it
ARM
Powershell
Automatic
Rules
Thresholds
Schedule
Manual
Scale In - Out
Number of Instances
Scale up - Down
Changing the pricing tier and hardware level
Service interruption
Scaling history can be seen in the Run history
Can be disabled
A resource can have only one autoscale setting
Profiles
Fixed Date
Recurring
Always
Add Scale condition then scale rule
Diagnostic Logging
Web Server
Detailed error
Failed requests
Web server logs
Http requests
Application diagnostics
Logs from code
Deployment diagnostics
Auto enabled
Streaming logs
az webapp log tail --resource-group --name
Application Insights
Log file Locations
Application
Application generated
Detailed Errors
Web server logs
HTTP
Web server logs
W3SVC--
Failed HTTP requests
Security
SSL
Import
keyvault
Upload
App Service managed certificates
Free
No Wildcard
No naked domains
Cannot export
No DNS-A records
Paid
Configuration
General Settings
Framework Verson
Platform 32 / 64
Web Sockets
Always On
manual Pipeline version
Http version
Auto Swap
Debugging
App Settings
Connection strings
Default documents
Path Mapping
Deployment Slots
Each slot is a separate instance of the web app
You can deploy a different version of your web app into each slot
Swapping
App is never exposed to the public web in a partially deployed state
Can avoid cold stars by warning up
Slot settings can be used to override default settings
Types
Swap with preview
Phase 1
Slot settings from the target slot are applied to the we app in the source slot
Warms up the source slot with new target settings
Can be tested before finalizing
Phase 2
Host names are swapped
Phase 3
Target host settings are applied to the target
Auto
Can't test the new app version in the staging slot before the swap
Azure automatically swaps it whenever you push code or content
Rollback
This option is only available on slots other than the production slot
Instantaneous
Slots
Production
User created slot
Each slot shares the resources of the App Service plan
Free, Basic, Shared - No slots
Standard - 5 slots
Premium, Isolated - 20 slots
Chathuranga Sandun Kumara