we notice that when we deploy a certain deployment slot, not all instances serve the same version
The reason you're facing this issue is due to ,
Azure's load balancer
keeping them active with the old version.ARR Affinity
is enabled, some users may remain stuck on old instances.To resolve the issue ,
Go to Azure App Service -> Configuration -> General settings -> set Session affinity ans session affinity proxy
to off
.
This will prevent from being stuck on old instances.
Thanks @ruslany for clear explanation, refer this Blog to learn how to warm up Azure Web App during deployment slots swap.
This ensures that instances are refreshed following a deployment.
Please refer this MSdoc for better understanding of the above environment variable setting.