Getting Started with Windows Azure
Before you jump in and start building things in Windows Azure, there are a few concepts that will make life easier for you if you understand them up front. These topics are in the context of infrastructure as a service (IaaS) but some of them apply to platform as a service (PaaS) as well.
Virtual machines need to be created in a cloud service. You can allow Azure to automatically create the cloud service, but I don’t recommend that approach. I prefer to create the architecture and build out the needed components and give them meaningful names. You have the ability to create multiple virtual machines in a single cloud service or put each virtual machine in its own. This is an important design decision as virtual machines in the same cloud service will be able to communicate with each other. If you intend to load-balance between machines, or if you have a need for high availability, you will want to put them in the same cloud service.
When creating resources in the Azure portal, you have the ability to choose a region or an affinity group for the location of that resource or service. The difference between them is important. It makes sense that you may want to locate related services in the same geographic location, but the affinity group lets you take that one step further. Resources assigned to the same affinity group will be located as close as possible in the same data center to increase performance and reduce latency.
The storage account is another resource that can be created automatically when you create a virtual machine. If you create it ahead of time, you can choose the affinity group to associate it with as well as the replication model and — of course — the name. By default, the storage account will provide geographically redundant storage (GRS). So, all of your storage will have multiple replicas right out of the box. The data is replicated between two locations hundreds of miles apart within the same region, so you don’t have to worry about your data leaving the US, for instance, if that is where you primary data is stored. In practice, it is unlikely you will access your data from the secondary site as it is fully replicated on three different storage nodes across three fault domains and three upgrade domains in the primary location. This, in turn, is asynchronously replicated to the secondary site, which also contains three replicas.
If GRS is not a requirement for your data, there is a discounted storage option called locally redundant storage (LSR). Like GRS, LRS provides three replicas in the primary location, but LRS stops there. LRS will protect against common failures like disk, node, or rack failures. If there was a major data center failure, you could be looking at extended down time or loss of data.
It is worth noting that although you can change the replication model between GRS and LRS and back again, you will be charged for the data replication going from LRS to GRS as it seeds the data across data centers. This is a one-time fee for converting from LRS to GRS, and it is avoidable if you plan your architecture ahead of time.
Availability sets provide fault tolerance for virtual machines across fault and upgrade domains. If you place two virtual machines in the same availability set, Azure will make sure they are deployed in two separate fault and update domains. You could think of it like two different racks with separate UPS and top of rack switching.
Now that you have some of the basics down, go take a test drive. It’s easy to get started with the Windows Azure. Sign up for an account or try the free trial at: http://www.windowsazure.com/en-us/
You will need to create a Microsoft Account if you don’t already have one and provide a credit card number as well as phone and billing details. It will take a few minutes to setup the subscription, and then you will be ready to go. Shortly after signing up, you will receive a few emails — one regarding billing and another with links to some guides to get started.
Microsoft produces some great how-to docs for Windows Azure. I recommend starting here.
That wraps things up for this week. Check back as I will be covering new Azure topics each week, and feel free to suggest a topic you would like to see.