It’s about time that I wrote up my experiences using cloud hosting somewhere other than in a book. I’ve used both AWS and Azure extensively in a professional capacity. For example, I helped build a distributed video upload and transcoding system for a company on AWS (annoyingly just before Elastic Transcoder was released, which would have simplified things). I’ve run multiple startups on Azure and this blog also runs on Azure (although it previously ran on AWS).
These cloud platforms all have their quirks, which you tend to only learn about the hard way after some time. AWS is better for some things and Azure leads in other areas. Some services are easy to migrate to another host and others lock you in to a platform. Pricing is universally complicated. It’s always hard to calculate costs and there are many confusing options to choose from that can save you a lot of money.
This is a big topic so I’ve split this post into a three part trilogy:
Scope
This post only covers cloud computing options, but they are not the only fruit. Dedicated or co-located hosting can be a far cheaper option if you have a very consistent load profile and have the skills to manage the servers. If you don’t need the convenience of cloud hosting (being able to instantly create a new server and scale up quickly to meet spikes in demand) then it may not be the best value option. There are ways to reduce your bill but it’s hard to compete with the price / performance characteristics of bare metal. Hybrid approaches are available and I’ve built systems that combine dedicated VPS hosting with cloud instances, but this is beyond the scope of these posts.
I won’t cover Google’s cloud offerings as I haven’t used them. They were traditionally very restrictive on what languages you could use but this is changing. All cloud hosting is a moving target, so what is best today may not be the optimal solution next year. This is why you should try to not lock yourself in to a particular vendor and stay generic. You may want to move provider for additional capabilities or because another platform offers more competitive pricing.
AWS vs Azure
Amazon Web Services (AWS) is the most mature of the cloud hosting providers. They traditionally focused on Linux and Infrastructure as a Service (IaaS), providing instances and storage for you to do with what you like. Today they offer a huge variety of products, including many Platform as a Service (PaaS) offerings at a higher level of abstraction.
Azure is Microsoft’s cloud service and came later to the party. It used to suck but has improved dramatically in recent years and Microsoft have put the whole company behind it. As you would expect, it has more of a focus on Windows servers. There’s a comparison from Microsoft on Azure vs AWS but this is probably biased.
Clearly, I’ve already started generalising. AWS offers Windows instances and Linux runs on Azure. When I make sweeping statements like these what I mean is that one provider excels in this area more than the other, not that it isn’t offered by both. It is important to understand where the focus of a cloud host lies and what they will spend the most effort on polishing. For example, running Windows servers on AWS is sub-optimal (particularly at the bootstrapping phase) and although you can run .NET apps on Elastic Beanstalk it’s easier on Azure. If a company is dogfooding and using the same OS as you for their hypervisor then they will obviously be optimising for that platform.
PaaS vs Iaas
Both hosts offer services at various layers of abstraction but some are stronger on a particular provider. These higher level products run on the same infrastructure that you can rent but required less work from you. If you’re not careful they can also lock you in, which I’ll write more about in part two.
In my experience, AWS is stronger with IaaS and Azure is better at PaaS (where you don’t manage the server directly), although this depends on the workload and software dependencies. For example, if your web app can use SQL Server then Azure is great but if it requires MySQL (like WordPress) then AWS is better. You would need to use a third party provider for your database on Azure but AWS supports it natively. AWS RDS has added SQL Server support and also offers a high performance MySQL-compatible relational database called Aurora.
Regions
If you have a global presence then getting your content close to users if very important for performance. Azure currently serves more regions than AWS.
AWS has less regions but they are similarly distributed and more are always opening. No all services are available in all regions (this is also true for Azure), full details are here.
Performance depends on many things, but a big factor is where your users are, so it’s a good idea to pick a provider with a data centre close to them. The UK has historically been underserved (whether this is due to taxation, government communication interception or something else is up for discussion) but happily this is changing.
You should always test performance for your specific use case rather than just making an educated guess. I cover how to measure the latency of cloud regions in my book.
Free stuff
The best way to make a decision is to try a service out. You can get free trials on both AWS and Azure.
Amazon will give you a whole year for free under certain limits. This is enough to run a small site for zero cost, although you need to provide a credit card and if you make a mistake it can get expensive.
Azure offer a free trial where they give you $200 of credit to use. However, if you are a startup then you should try to get on the BizSpark scheme, where you get $150 of credit every month for three years. This is easily enough to run a small site and you don’t need a credit card. AWS offer a similar program but it is harder to get on if you aren’t part of an accelerator.
Working out how long credit will last and how much services will cost you is a dark art. I’ll cover this in more detail in part three.
If you enjoyed reading this, or at least found it useful and interesting, then you will probably like my book on how to make high performance web apps. The book includes plenty of discussion on cloud hosting and how it affects the performance of your application, and in turn the happiness of your users.
I’m also available for hire.