Can I use something like deployments slots with Azure Storage Static Website?

Viewed 1706

I tried the Static website feature for Blob Storage in Azure and it is great!! Just copied my SPA static files (js, html, css, ...) and everything worked. Now to my question: how can I update the files and make sure that they are consistent?

With App Services I could use deployment slots and swap them when they are ready. If I just copy a new version the clients could get an inconsistent version (some files from the older one, some others from the new one).

This would be a huge problem for my .js files. Can I use something like a transaction that will make my files visible just when all of them were copied?

2 Answers

Consider creating another Storage Account that represents a staging environment and use Azure Traffic Manager to implement a swap.

This will also allow you to perform a blue-green deployment where you can send only a few user (lets say 1%) to your new deployment...

For those that can't find how to setup the Azure Storage Account with Traffic Manager like I could not, here:

Setup the traffic manage endpoint as a External endpoint, then add the storage account's FQDN found on the static website page. Then set the custom domain of the storage account to the traffic manager's DNS name.

Related