Azure vs. AWS Comparison: First Impressions

Recently I signed up for free trials from Microsoft Azure and Amazon Web Services to play around with and compare the two. Here are some of my first impressions. In this post I focus on the areas where the two services appear to be quite different.

Length, Cost, and Limitations of Trial Offers

With AWS you get a 12 months free trial, but you are only limited to using the services in the so called free tier. You also have to be very careful in how long you run your virtual machine instances.

With Azure you are given a $200 credit that you have up to one month to spend. The trial period is over as soon as you have spent the $200 or the one month has passed, whichever comes first. However, you get to test drive a lot more of the available services.

Performance

I have not compared performance of Windows VMs, but when it comes to Linux I would vote for AWS as the performance winner, even though there are a few caveats. Comparing Azure’s Basic A2 (2 cores, 3.5 GB RAM, 60 GB storage) to AWS’ t2.medium (2 vCPUs, 4 GiB RAM) and t2.micro (1 vCPU, 1 GiB RAM), I have found that

  • t2.medium is 3 times faster when building software
  • t2.medium has a Byte UNIX Benchmark score about 2.5 times higher than that of Basic A2.
  • t2.micro has approximately the same performance as t2.medium unless, of course, the job can be made parallel to make use of multiple CPUs.

A few other things to consider:

  • AWS has the concept of CPU credits, which leads to significant performance degradation if a VM is kept at high utilization levels long enough. This is especially noticeable with t2.micro.
  • t2.micro is included in the Free Tier, so it can be used free of charge for a year, subject to usage limits. See https://aws.amazon.com/free/
  • Basic A2, t2.medium, and t2.micro are advertised at roughly 15, 5, and 1 cents/hour, respectively.
  • Basic A2 includes 60 GB of storage. In AWS storage is separate. This doesn’t change the picture much, however, considering storage consts.

Networking Between VMs

One of the first things that struck me when playing with AWS was that even if the virtual machines are on the same network as determined by IP addresses and netmasks, still you need to configure rules in the security group (sort of a firewall) to enable them to talk to each other over the network.

On the other hand, with Azure you get a default routing between sub-nets, so if you want to keep machines on different sub-nets from communicating with each other you have to do so by setting up firewall rules.

Please note that neither AWS, nor Azure currently support IPv6 networking. Looking forward to seeing who is first and how it works!

Features Available with Trial Offers

One of the striking differences I found between AWS and Azure is that the former does not allow you to use the free tier to tie a website to your registered domain. To do so you need the Route 53 service that is not available with the free tier.

On the other hand, setting up an Azure website with your registered domain is a breeze. One little stumbling block I encountered, though, was a lack of name servers in Azure. With many hosting providers you get name servers. You can then configure your domain with your registrar to point to those name servers and can then use the domain at your hosting provider. Not so with Azure. You have to edit your DNS records to point them to your Azure website, which may be a pain, especially with some registrars like Hostgator. Please see another of my posts for more details here.

Controlling the Cost

With AWS, even during the 12 months free trial, there is always a danger of using too many resources and running up a bill. With Azure, since the trial was only 1 month/$200, I decided to continue my experimentation by switching to a pay-as-you-go subscription, and thus there is also a danger of a runaway bill. So, I decided to set up some alerts.

Setting up billing alerts in AWS was a breeze. However, getting billing alerts to work in Azure was a pain. Understandably it is a preview service, so no wonder things were not quite smooth. I applied for the service and was supposed to have a new Alerts tab under my pay-as-you-go subscription. I was also supposed to get a confirmation e-mail. This is all according to Azure documentation. However, there was no e-mail, and at different times my account either looked as if I had never signed up, or there was a notification “You are queued (status).” Either way an attempt to sign up again would lead to an invitation to create a new subscription.

I wrote to Azure support, and it was horrible. I would get phone calls in the middle of the night despite the fact I specified e-mail as the preferred communication method. I would get messages thanking me for confirming a resolution when in fact I didn’t confirm anything. I would respond to the tech support rep, and she would write back saying the case was being closed since she had not heard from me.

Finally, after several weeks, I did get my billing alerts capability! Yeah!!!

References

Use VirtualBox Disk or VM in Azure

What if you have a virtual machine in VirtualBox on your computer and want to deploy that VM to Microsoft Azure? The problem is that a VHD created in VirtualBox, uploaded to Azure, and attached to an Azure VM will crash the VM. The Azure machine will spend some time trying to start, but will then go to status: Stopped (could not start). Here is how you can work around this problem.

The key is to create an empty disk in Azure first. You can do this by attaching an empty disk to an Azure VM. Then the VHD corresponding to the disk is downloaded to your computer, attached to a VirtualBox VM, and VirtualBox is used to install and configure an operating system on the VHD disk. Then the VHD is uploaded back to Azure, an Azure disk is created from it, and an Azure VM is instantiated from the disk. Important: make sure you specify that the disk contains the appropriate type of OS when creating a disk from the VHD!