Interview Prep/Azure/Compute and App Platforms

How do deployment slots and swap work?

IntermediateConceptCompute and App Platforms
Answer

A slot (staging) is a live app on the same plan. You deploy to staging, test it, then swap:

az webapp deployment slot swap -g rg -n app-shop --slot staging --target-slot production

During a swap, App Service applies production settings to the staging instances, warms them up (hits the root path or applicationInitialization paths), then switches routing. Settings marked slot setting (sticky) stay with the slot, which is how prod keeps its prod database connection string. Swap back to roll back. Auto-swap can chain this into CI.

Azure All Azure questions Roadmap: Azure core services

More on Compute and App Platforms