måndag, juni 17, 2013

How to calculate cost of Windows Azure Blob?

I'm often asked to explain how we charge for Blob Storage in Windows Azure. Time for a new blog post!

The documentation says:

Storage capacity is billed in units of the average daily amount of data stored (in GB) over a monthly period.

This means that every day we calculate an average on how much you have stored in your storage account. This is then summed up and divided with the number of days and gives you an average usage for that month.

An easy example: You store 1 GB day one and stores this for 30 days. Every day we calculate the average of much you have stored and the answer is 1 GB each day. So 1 GB * 30 days = 30 GB / 30 days = 1GB. Hence this month we charge you for 1GB of storage = $0.095 in total.

A bit more complex: You store 10 GB for the first 15 days and then you add another 10 GB for the next 15 days. The first 15 days your average is 10 GB and the next 15 days its 20 GB. This gives us 15 days * 10 GB + 15 days * 20 GB = 450 GB / 30 days = 15 GB in average = $1.425 in total.

Please note that the prices are from 17 of June 2013 and current prices can always be found at http://www.windowsazure.com.