As I tour around Canada doing talks on Windows Azure at conferences and user groups, I found that the biggest concern around the cloud computing paradigm shift is cost. Slightly confused as to how a key offering of a platform is a sticking point against its adoption, I asked for some feedback. Here are some findings:
- If I invest in developing against a particular platform, how simple is it to migrate to a different platform?
- If the project that is deployed to the cloud doesn’t require the grade of redundancy and scalability in the cloud, is it possible to host the project in house in order to save money?
- How is cost accumulated for billing?
There are a few things that I’ve taken away from some of the feedback that I’ve gathered at the talks that I’ve done thus far. There is definitely a lack in understanding of the billing model of Windows Azure, but there is also a misunderstanding of the advanced infrastructure that Microsoft has unveiled. In this post, I plan to clarify some of the misunderstandings about the Windows Azure Platform.
Will I get a Migration Migraine?
To speak towards the first point, there are always many things to consider when choosing one platform over another. Each platform will normally have different offerings to attract a market from their competition. It’s ultimately up to the Developer or Systems Architect to make the decision to leverage those offerings, which could potentially “lock” an application into a particular platform.
If you are worried about your application being “locked” into the Windows Azure platform, you can opt out of the choice to use the Storage Services and leverage a [potentially larger] database instead. It’s the cost that will ultimately steer you in one direction or another on platform, and further more the features of said platform. On the plus side, leveraging Storage Services over a database while using Windows Azure gives you the ability to limit the cost of your application, while increasing the response speed of data transactions (Storage Services can be partitioned and scaled across multiple nodes, and also have a ).
If you feel the need to pull your application off of the Azure Platform, you can export the data in the Storage Service into a CSV, or Excel formatted file using the Azure Storage Explorer. The only extra cost of migration would be writing a script in order to migrate the data into your next storage solution, which is slightly more work then if you were migrate directly from one database to another, assuming there is a clear migration path between the two.
Windows Azure Billing Overview
Considering that the billing model for Windows Azure is a little complex, I though I’d take some time to break it down into sections, and outline some common misconceptions in each section, so it can be better understood. When deploying to Windows Azure you will be billed for the following categories: Compute Time, Storage Services, SQL Azure, AppFabric, Data Transfers.
The Core Costs
The Chart Above taken from my presentation “Taking it to the Cloud with Windows Azure” is an outline of how the charges are broken down. The Core Costs [cost that are billed each month for the service] of Windows Azure are Compute time, Storage Services, and Data Transfer.
Compute Time is billed out depending on the Instance Size you are running your application on. This cost is accumulated in real-time hours as long as you have resources allocated to a particular instance, I will review this in more detail below.
Storage Services aren’t necessarily required, however you are able to store Diagnostic information in table storage to keep track of errors and restarts of your applications in the cloud. Storage Services are also handy when you are using Worker Roles [behaves much like a Windows Service] to process long running/scheduled tasks, or tasks that require heavy lifting.
Data Transfer is metered by the amount of data that is travelling in or out of the data center. This is where you can benefit by optimizing your web application by using the ASP.NET MVC Framework to help minimize the size of your pages leaving the data center.
That covers the “Core Costs” of Windows Azure, which leaves the additional three items at the bottom of the chart SQL Azure, App Fabric and Simultaneous Staging Environments.
SQL Azure is a full scale RDBMS running in the cloud, it is built on SQL Server 2008, and carries a few minor limitations over a regular SQL Server installation. SQL Azure isn’t a Core Cost as you can leverage Storage Services to create a Non-Relational Entity based Storage System and manage any needed relationships in Code. However, a lot of applications do require a more robust system, which will require a Relational Database.
Windows Azure AppFabric [not to be confused with Windows Server AppFabric] offers both Access Control Services for Cloud based Security as well as a Service Bus in which you could expose an on premise Database to the Cloud. Both could be leveraged in unique scenarios, but not necessary for all applications as .NET Roles and Membership Providers can still be leveraged in the cloud.
Simultaneous Staging Environments are costs that will occur from time to time when you are in the staging phase of a deployment. This occurs when you have both the Production and Staging Environments of your Hosted Service in use at the same time. I will explain this more in detail below.
Calculating Costs on Azure Compute Hours: Compute Sizes
The first thing you have to understand when calculating Windows Azure compute costs is that compute instances come in four (4) unique sizes to enable complex applications and workloads. These virtual compute instances are virtual machines running within one of currently six (6) data centre containers:
|Compute Instance Size||CPU||Memory||Instance Storage||I/O Performance|
|Small||1.6 GHz||1.75 GB||225 GB||Moderate|
|Medium||2 x 1.6 GHz||3.5 GB||490 GB||High|
|Large||4 x 1.6 GHz||7 GB||1,000 GB||High|
|Extra Large||8 x 1.6 GHz||14 GB||2,040 GB||High|
This is important to remember as the compute costs are directly related to the size of instance you choose. (Note: The default instance size is currently SMALL, if you wish to modify this it can be found in the Properties screen of your Web Role.)
Compute cost per size is as follows (note: prices are subject to change):
- $0.12 / hour for the SMALL instance
- $0.24 / hour for the MEDIUM instance
- $0.48 / hour for the LARGE instance
- $0.96 / hour for the EXTRA LARGE instance
When you check your bill, all instance hours are converted to SMALL instance hours and is billed at $0.12 / hour. If you have two (2) MEDIUM Instances running, you will be billed for four (4) SMALL instances. It is important to note that instance hours are accumulated by each hosted service that contains a deployed project, regardless if the service is running or suspended.
Deployment and Staging Environment
One of the nice features of Windows Azure is it gives you a staging environment in which you can test your application in parallel to your Production Deployment before promoting the new code into production.
In this screenshot (below), you can see the production and staging environments. The Production Environment has an active deployment, you can identify when charges are accumulating by the cube under each of the environments. If the Cube is Blue the Instance is Accruing Charges, likewise when the cube is Grey the Instance is inactive and no longer accruing charges. If both your Production and Staging environments have a Deployment [Cubes are Blue] Both Instances are Subject to Billing.
Note: In order to deactivate a deployment you must Suspend the application and Delete the Deployed Cloud Service Package.
Calculating Azure Storage Space
Windows Azure Storage is calculated in two ways: (1) storage space measured in GB hours and (2) storage is billed by storage transactions. Now, I know what you’re thinking: “What exactly is a ‘GB hour’?” Assume there is 750 billable hours in a month. This means you can store 750GB of data for a billing period and you will get charged for 750GB. However, you could alternatively store 750GB for one (1) hour. As a result, your account would accrue 1 GB in storage charges since storage is billed at the following rates:
- $0.15 / GB Stored / Month
- $0.01 / 10K Storage Transaction
(Please note that billing fees are subject to change.)
The newly release Windows Azure Drive (XDrive) which is currently in beta will also be subject to this same pricing model, as the XDrive is a Page Blob which is mounted into Blob Storage and can be configured for capacities between 16MB – 1TB in size (up to 16 drives per VM).
Calculating Azure Data Transaction Costs
The last of the standard costs for Windows Azure is data transfer. Data transfer is the equivalent of bandwidth allocation in the traditional hosting model. These costs are calculated over the course of a month and billed out in terms of GB of data transferred, there is a separate rate for data being transferred in and out of Windows Azure.
North American & Europe Data Rates
- $0.15 / GB Outgoing Data Transfer
- $0.10 / GB Incoming Data Transfer
Asia Pacific Data Rates
- $0.45 / GB Outgoing Data Transfer
- $0.30 / GB Incoming Data Transfer
How to Forecast SQL Azure Charges
SQL Azure is another form of storage which is subject to both data storage and data transfer charges. SQL Azure databases are interesting as you can have as many databases as you need to consume your applications data. Charges are accumulated based on actual data usage per database.
- Web Edition:
- Up to 1 GB relational database = $9.99 / month
- Up to 5 GB relational database = $49.95 / month**
- Business Edition:
- Up to 10 GB relational database = $99.99 / month
- Up to 20 GB relational database = $199.98 / month**
- Up to 30 GB relational database = $299.97 / month**
- Up to 40 GB relational database = $399.96 / month**
- Up to 50 GB relational database = $499.95 / month**
- Data transfers = $0.10 in / $0.15 out / GB – ($0.30 in / $0.45 out / GB in Asia)*
* No charge for inbound data transfers during off-peak times through October 31, 2010
** SQL Azure 50 GB Business Edition Database and 5 GB Web Edition Database will be available starting on June 28, 2010.
Understanding AppFabric Billing
As you may or may not be aware, AppFabric is a place in which you can expose a endpoint as a pipeline from the cloud to a non-cloud based system. This makes it a relatively unique platform to meter for billing. Microsoft has decided to make a “pay-as-you-go” model, as well as a number of packages to make a more customized experience for your particular business requirement.
Bundled in with AppFabric is Access Control which is a flexible and configurable security model for Windows Azure. Access Control is billed out based on a transactional basis.
- Access Control: $1.99 per 100k transactions
- Service Bus: $3.99 per connection on a “pay-as-you-go” basis, or:
- Pack of 5 connections $9.95
- Pack of 25 connections $49.75
- Pack of 100 connections $199.00
- Pack of 500 connections $995.00
Bringing it all together
Hopefully, you now have a better understanding of Windows Azure billing. I’ve covered all of the current items that would be billable in Windows Azure. There are however a couple of pricing models that are available as part of Introductory offers Microsoft has put forth to get people to try Windows Azure. If you are thinking of moving to this platform and would like to calculate some estimates of what your applications may cost to run in the cloud consult the TCO and ROI Calculator. To find out more information, check out the following resources: