We have a common setup where we deploy a asp.net core web application to Azure App service with deployment slots. I.e. we have two slots. We deploy into passive stage one. We warm it up and then we swap.
The main issue we are experiencing is this. We have javascript files served from the application that have unique hashed file names.
For some deployments our Cloudflare CDN caches a 404 for the newer version of a Javascript file.
This indicates that a user was served the HTML file from the new production instance, requesting a newer version of a Javascript file and then the request for the Javascript itself was sent to the old instance, resulting in a 404 that is cached for some short time.
We haven’t been able to prove this from the logs. I.e. I cannot see the 404 on the old instances in the logs.
Have anyone else seen some related issue with App service deployments through swap? Any ideas what could cause this? I know it is kind of vague everything but I feel we are stuck at the moment with very fragile deployments and no real solution in front of us.