Storing Data on the Windows Azure Platform

Slalom Consultant Joel Forman

Slalom Consultant Joel Forman specializes in cloud computing and the Windows Azure Platform.

The Windows Azure Platform provides a lot of different building blocks that you can use to build your cloud solution.  As far as choosing how to store your data in the cloud, you have options.  Windows Azure Storage has different types of durable, scalable storage for blobs, tables, queues and even drives.  A totally separate offering, SQL Azure, provides a relational database solution in the cloud.  I will touch briefly on these options, and then give some guidance.

Windows Azure Storage: BLOB Storage

BLOB Storage provides a place to store binary data (i.e. files) and associated metadata.  It can be compared a file system, where you can create containers (folders) to organize files.  It is a great place to store images, documents, videos, backup files, archived files, and the like.  The Windows Azure Content Delivery Network can sit in front your BLOB storage to provide better performance to end users downloading these files.  Custom domain names can be associated with Azure storage accounts now as well, so you could literally have a user hit and have that delivered through the Azure CDN.  This offering will be in direct competition with Amazon S3 and its CDN.

Windows Azure Storage: Table Storage

Table  Storage provides structured storage in the form of tables.  Tables hold entities and entities have properties, but there is no schema enforced on the storage side.  Table storage is designed for systems that need to be scalable.  These tables can scale to billions of entities if need be, with your data being partitioned transparently across servers by the storage platform.  It is up to the application to define how data is partitioned, a decision that should not be taken lightly.

Windows Azure Storage: Queue Storage

Queue Storage and its API provides an out of the box message queue for an application.  The queue service and storage provides a great way to accomplish asynchronous processing, something to always be thinking about when developing for the cloud.  Azure Queues can be the bridge between a Web Role and Worker Role, or even and on-premise system and a cloud system.

SQL Azure

SQL Azure provides a relational database in the cloud, and a very familiar experience for developers used to building databases with SQL Server.  A large number of features in SQL Server are supported in SQL Azure, and a few are not yet.  The key is that your SQL Azure database will have a size limitation.  Currently the maximum size for a SQL Azure database is 50 GB.  For applications needing to scale beyond that size limitation in SQL Azure, sharding/partitioning will need to be implemented.

Making Choices

So you are developing a new application in the cloud.  With these options available to you, what do you use?  After developing several application on the Windows Azure Platform, my answer is a hybrid approach.  Your choice depends on the data you are storing.  In my solutions, I take advantage of all of these offerings to achieve the best results for my app.

Let’s take one of the current applications I am working on as an example.  It’s a pretty standard web application, with a database backend.  For relational data, we are using SQL Azure.  But gone are the days of storing files, images, etc in a SQL database.  We use BLOB Storage for those, and take advantage of the CDN offering.  We do a lot of logging in our application, and are using Table Storage to store this data via Windows Azure Diagnostics.  We don’t have to worry about logs filling up our SQL Azure database.  Our logs can scale without impacting our vital application data.  Finally, we use Queue storage for triggering asynchronous work, minimizing wait times in our UI.

If you feel that your relational data is going to go beyond the current limit of a SQL Azure database (after you have removed anything from your SQL Azure database taking up space that could be stored in another medium), then Azure Table Storage may be a better way to go.  This system is truly designed to allow applications to scale very large.  Having to build partitioning logic into your application because you have to take on another SQL Azure database is something you could have avoided by architecting against Azure Table Storage from the start.

So the key is using these storage offerings where the make sense.  Don’t be afraid to use both SQL Azure and Windows Azure Storage together.  Stay tuned for more posts that delve deeper into these topics.

Follow Joel on Twitter: @seattlejoel.

Slalom Consulting's Seattle Office Slalom Consulting Cloud
More about Slalom Consulting’s Seattle office. More about Slalom Consulting’s Cloud focus.

subscribe by emailSubscribe to be emailed about new Cloud posts.

About Joel Forman
Joel Forman is a Solution Architect at Slalom Consulting and specializes in cloud computing and the Windows Azure Platform.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: