Deployment Slot
A deployment slot is a separate live instance of an App Service app, such as staging, that shares the production app's plan. You can swap it with production for near-zero-downtime releases and quick rollback.
Deployment Slot
Each slot has its own host name, settings, and content. You deploy the new version to staging, let it warm up, test it, then swap. A swap is a routing change between two already-running instances, not a redeploy, so a bad release can be swapped back in seconds. Slots need the Standard tier or higher and run on the same plan, so there is no duplicate infrastructure to pay for.
How Does a Slot Swap Work?
How Do You Swap Slots?
az webapp deployment slot create --name mumbai-api \ --resource-group mumbai-prod-rg --slot staging az webapp deployment slot swap --name mumbai-api \ --resource-group mumbai-prod-rg --slot staging --target-slot productionWhy It Matters in Production
A fintech team like PhonePe's can deploy each release to staging, run smoke tests, and swap only after health checks pass. If error rates rise, swapping again restores the previous version almost instantly.
Common MistakeForgetting slot settings. App settings and connection strings swap with the code unless you mark them as deployment slot settings, so a swap can point production at a staging database.
TipUse swap with preview to apply production settings to staging and verify the app before completing the swap.
Frequently Asked Questions
Do deployment slots cost extra?
No separate charge. Slots run on the same App Service Plan, but they use that plan's CPU and memory, so heavy testing in a slot can affect production.
What does a swap actually do?
It exchanges the routing between two running instances after warming up the source slot. Content is not copied, which is why it is fast and reversible.
Which tiers support slots?
Standard, Premium, and Isolated tiers. Free, Shared, and Basic do not, and the number of slots allowed rises with the tier.