I'm looking at hosting 3 Websites (there will all use the same linked database resource but I think I have to use 3 websites within Azure for this); www.website.com, provider.website.com and admin.website.com.

Using Windows Azure Websites, can you have a Staging, Production slot? I think this feature is only available to Azure Cloud Services but there is little documentation on this. If its not possible, other than spinning up 3 more sites to act as the staging sites is there another way?

I want the ability to "swap" from staging to production.


I think you'd have to spin up the extra staging sites. Are you deploying your sites via Git deploy? If so, it's probably better to have separate staging and production sites anyway. That way, you can make your changes in the staging branch, push them across, and then merge your staging branch into your production branch when you're ready and push that. What problem are you trying to solve with this approach?

  • With the production, staging slots (only via VMs I think) you can switch them instantly and therefore have no downtime. I guess that's the feature I want. With the git push model to production, does it switch automatically once pushed or is there noticeable downtime whilst the revision is pushed? – Barry King Nov 27 '12 at 16:08
  • I've not noticed any downtime per se, but with my site, which is built on top of Orchard, I have to restart the website from the Azure dashboard after the Git deployment finishes. It's not instantaneous though. Azure tells you that the site has restarted, but I'm finding that it takes about 15-30 seconds to propagate that change. You'll get a few seconds of 503 errors and the next refresh will see the app pool restarting. – levelnis Nov 27 '12 at 16:16
  • If you link the Git deployment to Bitbucket or Github then you can push your staging/production branch to said repo and Azure will automatically deploy that change. Takes about a minute or two – levelnis Nov 27 '12 at 16:17

At the time (Nov 2012), levelnis answer was correct.

The Azure team have recently implemented slots for WebSites however. It looks like the initial implementation is two slots, one for prod and one for staging.

Reading the dev branch of the xplat tools it seems that these might be extended to several slots named as you please. The tools will have commands like azure site create --slot and azure site swap for managing these slots and the relationships between them. I think this will enable some really robust approaches to continuous delivery on Azure Websites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.