Azure Upgrade Costs

So you have an application running in Azure, running on a set of web and worker roles, and you need to upgrade it. What do you do?

Well, you could redeploy your application to the live, production instances of your web and worker roles, but that would result in half an hour of downtime or so. That’s probably not the best option if you have users that connect to your site, unless you have periods of time where it doesn’t matter if your site is down.

You could also do an in-place upgrade

The third option is to do a VIP Swap, where you set up a completely new set of servers in Azure with the new version, then you click a button and your production IP address immediately starts routing to the new servers.

The following chart, from Mark Russinovich‘s recent talk on Azure, shows some of the limitations with these three options:


That’s great, but how much is this going to cost?

VIP Swap
A VIP swap upgrade requires that you start up a new set of roles in the staging environment. This will have an added cost, as you must pay the hourly/monthly fee for staging roles just like you do for production roles. However, this can be minimized if you delete the staging environment when you’re done. If you have the staging environment up for less than an hour, which seems quite possible, you can get away with paying under $1 per role for the hour that is up if they are extra large instances (or less for smaller roles). This can be done with the following process:

1. Decide you want to upgrade your app from v1 to v2
2. Ramp up a sufficient number of staging servers with v2, wait for them to all be ready
3. VIP swap
4. Delete/Remove the staging servers, which are now running v1 (don’t just turn them off)

However, if you need to have your staging servers up for test purposes on a permanent basis, the cost of the staging servers will be whatever the monthly fee is for the staging roles, independent of the cost for the production roles. Additionally, keep in mind that when you delete and then redeploy the staging servers, the DNS name for the staging servers will change, and it can take several hours for the new DNS name to propogate and be available for your testers.

In-place and Delete/Redeploy
For an in-place upgrade or a delete and redeploy, there is no added cost, unless you are changing the number or size of the roles, which of course will mean that your monthly bill will increase. But there is no cost associated with the upgrade itself.

References:
http://blogs.msdn.com/b/windowsazure/archive/2011/10/19/announcing-improved-in-place-updates.aspx
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/COS301
http://view.officeapps.live.com/op/view.aspx?src=http://video.ch9.ms/build/2011/slides/SAC-852F_Russinovich.pptx