1

We are using Azure CDN from Microsoft with a Custom Domain (with HTTPS enabled) to serve content in a WebApp.

The caching rules behavior is set to "Cache every unique URL", and we use rules engine to define caching rules. The default rule is "Set if missing" with duration of 1 day, followed by specific rules for URL paths beginning with "/img" where the behavior is set to "Override" with duration of 7 days.

Let's say the URL is https://my-application.example.com that redirects to https://my-application-cdn.azureedge.net (which points to https://my-application-webapp.azurewebsites.net).

Today we installed an update to the application and I needed to purge the CDN. I clicked on "Purge all" in Azure portal and waited for the operation to finish. The https://my-application-cdn.azureedge.net/ content was purged [it showed the new version of the webpage], but the https://my-application.example.com/ was still showing the old version of the webpage.

I waited several minutes, tested with different browsers, than asked my colleagues in other cities to test. It did not work anywhere. Finally I re-clicked on "Purge" and specified "/" and "/*" as paths, and then I modified the caching behavior for the default path by setting it to "Bypass cache" (so now nothing is cached except for "/img" files). I don't know which action was the right one, but in the end I managed to have https://my-application.example.com/ serve new content. But for like 15 minutes we were delivering something like a partial update. We had never experienced this problem before (we used to use NGINX cache).

I am quite puzzled about all this. I used to think that DNS CNAME entry was a simple redirection, but finally it's as if there were two separate caches: one for https://my-application-cdn.azureedge.net/ and another one for https://my-application.example.com/. Is this true? If so, is there any way to get it work every time?

0 Answers0