Amazon Web Services compared to the Azure Services Platform
In my previous post about Azure Services Platform I summarized many of David Chappell’s points in his talk last week as well as Clemens Vasters intro to .Net Services. One of the things David mentioned was other cloud providers that exist today.
| One that I find particularly interesting is Amazon. In this article I will cover the Amazon Web Services and how they map to Azure Services Platform. Amazon is my starting point, so I will not talk about the services that Microsoft have that Amazon don’t, unless they are tightly connected to one of Amazon’s services. One thing to note though is that Amazon has been offering cloud services for a while and some of their services are already out of Beta. MS however is just getting started so it’s not easy to know where MS is going to end up compared to Amazon. In other words; this article might be out of date pretty soon! :-) Saying that, some design decisions needs to be taken early and some decisions can’t easily be reverted, so many of the differences and similarities between the two providers will probably be around for a while. And when people from Microsoft are going to Amazon, maybe the similarities between the two will increase even further…
Actually, talking about mappings, lets get the first mapping out of the way: Amazon Web Services maps to Azure Services Platform. |
Amazon EC2
Amazon Elastic Compute Cloud (EC2) is a virtual computing environment that let you create virtual servers in the cloud. Either Linux or Windows based. Windows based OS’s (Windows Server 2003) are in Beta and only available at the datacenters in the US, but I’m expecting Europe to provide this service soon. By creating or using a predefined Amazon Machine Image (AMI) and adding your application to the same image, you get your application into the cloud. By using the EC2 web services or any of the configuration applications out there (like Elasticfox) you can configure your virtual images, security, network access and more. To do actual work on the image (like installing applications) you just RDP into that server and do your install or configuration.
Amazon EC2 vs. Azure Services Platform
EC2 can be compared with Windows Azure. What Amazon let’s you do which Microsoft don’t, is have direct access to the virtual image. You can RDP (Remote Desktop) into the server and do whatever you want and install whatever. Windows Azure gives you an API where you can configure stuff like logging and alerts. According to MS they will provide more services to interact with Windows Azure later, but I don’t think you will get access to the actual virtual image(s). To add applications to Windows Azure you need to use either the Web Role or the Worker Role. However, windows Azure maintains the OS for you (updates and such) while on EC2 you have to do this yourself. Amazon today gives you a Windows 2003 Server while on Windows Azure it’s Windows 2008 Server. On Windows Azure you can configure how many instances of your Web/Worker role you want for scaling, while on EC2 you need to use the provided web services to spool up new instances.
One thing Microsoft provide that Amazon don’t is the ability to have a local environment of “your cloud”. This allow you to do development on your local computer in a simulated cloud environment, which again will let you do things like debugging. You can of course to this on EC2 as well by installing Visual Studio :-)
A common requirement for both is that the EC2 image and your Web/Worker roles need to be stateless. If not, scaling would just not work the way it’s indented.
For more information: Amazon Elastic Compute Cloud (EC2) and Windows Azure
Amazon S3
Amazon Simple Storage Service (S3) is where you persist your data/files. Here you can store anything from files you need for your server to databases, downloadable files, or any files you want to store in the cloud. S3 exposes a web service you use to write, read or delete files (objects) up to 5 gig each. The number of files you can store is unlimited, but you of course have to pay for storage. The underlying structure is flat using a key/value pair to write and read (or delete). They use names like Buckets, Keys and Objects. A Bucket is similar to a file folder, a Key is the unique identifier for your object within a Bucket and the Object has metadata about the object you have stored (like created date, modified date, content type etc).
Amazon S3 vs. Azure Services Platform
Comparing this with Microsoft’s services is not a one-to-one mapping. To explain this I need to give you some details about the data services provided by Microsoft. First there are two main services:
- The data storage facility in Windows Azure
- Microsoft SQL Data Services (SDS)
In Windows Azure you have three storing options:
- Blob
- Table
- Queue
And to make the story short: Windows Azure with its Blob service is similar to S3 in my opinion.
The ability to query data on S3 is limited compared to Windows Azure, but Amazon provide this service in their SimpleDB instead which integrates with S3 (more on this later). In Windows Azure you can use a LINQ like query language, but on S3 you’re limited to using a pre-known bucket and key. Both do however have similar url access:
S3 example: http://torresdal.s3.amazonaws.com/photos/me.jpg
Windows Azure example : http://torresdal.blob.core.windows.net/photos/me.jpg
In the S3 example; photos = Bucket, me.jpg = Key
For more information: Amazon Simple Storage Service (S3) and Microsoft SQL Data Services (SDS)
Amazon EBS
Amazon Elastic Block Store allow you to do two things:
- Create volumes
- Create snapshots
Volumes are storage volumes from 1GB to 1TB that can be mounted as a disk on EC2. They’re also placed in a Availability Zone, meaning you can only attach volumes to EC2 instances that run in the same zone.
A snapshot is a copy of the complete volume at the time you took the snapshot. If a snapshot already exist, only the diff will be saved to save storage. All snapshots is stored in S3 for later retrieval. You can then use your snapshots to create new volumes based on one of your snapshots.
Public Data Sets is free snapshots everybody can use. They contain big databases for things like public DNA data, transportation data etc. Typical data used for research. Though I’m not in that type of business or research, I see the perfect match for the service they’re providing.
If you want to use your own database server (like SQL Server) you would use an EBS volume to store the database files to persist data. This will make sure that all your data are persisted in case the server goes down for some reason or another.
As a side note I have to admit every time I read Elastic Block Store, my mind reads Elastic Book Store, which kind of makes sense considering who provides the service :-)
Amazon EBS vs. Azure Services Platform
As far as I know there is nothing equivalent on the Microsoft platform. Since they don’t have an open interface giving you direct access to the OS there is no need.
For more information: Amazon Elastic Block Store (EBS)
Amazon SimpleDB (Beta)
Amazon SimpleDB lets you store, process and query data in the cloud. It is designed to scale and developers use provided web services to integrate with the service. There is also a connection between SimpleDB and S3 allowing you to query data in S3. SimpleDB is structured into domains which contains items which again contains attribute-value pairs, resulting in a flat and highly optimized data structure. Querying data is done through either the Select API or the Query API.
Amazon SimpleDB vs. Azure Services Platform
Comparing SimpleDB to MS is not strait forward. As mentioned previously when I talked about S3, Microsoft provide several services in this area. You have the data storage in Windows Azure with its Blob and Table data structure, and you have Microsoft SQL Data Services. All of these can be compared to SimpleDB, though they’re not an exact match. As the word Simple is suggesting, Amazon is providing a simple interface for storing data. Microsoft is giving you more options to how your data is going to be stored and structured, but all in they all have a flat structure similar to Amazon’s SimpleDB. Microsoft is however building on top of their existing database investments of SQL Server and provides similar services that we know from that platform in the cloud.
For more information: Amazon SimpleDB, Windows Azure Tables and Blobs, and Microsoft SQL Data Services
Amazon SQS
Amazon Simple Queue Service (SQS) is, you got it, a queue. As with the other services they provide this is highly scalable and they provide unlimited numbers of queues to use as well as unlimited number of messages to add to a queue. The body of the message is limited to 8KB and a massage can be stored up to 4 days before it gets deleted. Though the message body is limited, you can use the body to reference data stored in e.g. S3 or SimpleDB. They provide you with four API’s: CreateQueue, SendMessage, ReceiveMessage, and DeleteMessage, and are exposed as web services.
Amazon SQS vs. Azure Services Platform
Compared to Microsoft this is the queue storage type in Windows Azure as I mentioned above (in the S3 section). But queues are often used in conjunction with workflows, and here Microsoft provide its own service. Amazon however does not have a separate service for workflows, but encourage the use of SQS for this. The Windows Azure Queue as described now has a main purpose of providing a communication facility between the WebRole and the WorkerRole. As with SQS also the Azure Queue have the same flexibility and limitation (unlimited queues, unlimited messages and a message size of 8KB). I could not find any information about how long MS stores messages in a queue, though I expect there to be one :-)
For more information: Amazon Simple Queue (SQS), Windows Azure Queue and Microsoft .NET Workflow Service
Amazon CloudFront (Beta)
CloudFront is a service for distributing files. All files are stored in S3 but CloudFront is using a network of edge locations, so that users downloading/accessing files will get it from a location close to him or her. When a user request a file/object CloudFront will automatically route to the nearest edge location for best performance.
Amazon CloudFront vs. Azure Services Platform
Currently I cannot see a similar service from MS. There has been some speculation that Microsoft’s cache solution codenamed “Velocity” is their service in relation to CloudFrount, but I don’t see the match.
Conclusion
The similarities between the services provided by Amazon and Microsoft are striking. There are a lot of similarities on how they store, manage and query data. Especially that they both have chosen a flat data structure with no relational tables, which is the only sane thing to do when you want to scale I guess.
The major differences are around how they expose their operation systems to the developer. Amazon gives you access via RDP to the virtual server, while MS adds services on top of their virtual servers that you can integrate with. Also since Amazon is not an OS or application manufacturer they are freer to chose which technologies to provide. Here Microsoft is more restricted to their own platforms and technologies, though they promise to support other programming platforms than .Net.
So the final question to all of this have to be:
Which one would you choose?
Based on what I know about the two service providers now, I would go for the consultant answer… It depends :-) and answer with a new question:
What are you going to use it for?
If you have an existing application built around SQL Server that does not need to scale very much (like an enterprise app), Amazon seams like a good solution right now. If you’re starting from scratch and writing a new application that suits the cloud model, then I’m not that sure. Technology or programming platform will probably impact your decision. Looking into the future and if your a .Net developer choosing MS is probably a safe bet, because you would get great service support on their platform as well as a local version of Windows Azure on your desktop. On the other hand, Amazon’s solution is quite open and does not limit you to any programming language. The race is open and I’m excited to see where they are in a year or so…
