I've set up a deployment slot called "staging", and have configured continuous deployment to deploy to the staging slot every time code is pushed to the master branch.
When I swap staging with production - either using the portal UI, or with the below CLI command:
az webapp deployment slot swap --name <...> --resource-group <...> --slot staging
My understanding is that:
- Initially, old code is in production, new code is in the staging slot.
- Initially, 100% of traffic ought to be going to production webapp.
- Gradually, traffic is routed from production to staging.
- Eventually, all traffic is going to staging webapp.
- Then there is a DNS rename such that the production app is now getting 100% of traffic, and has the new code; staging now has old code and in theory 0% of traffic.
However, several hours after doing the swap, I still see about 15% of traffic going to staging. I have verified this on 4 different webapps.
Appreciate any suggestions on why this might be the case, and if I'm doing something wrong?