Moving to the cloud with IaaS

Table of contents

As we covered in my previous article the first thing you can get from the cloud is a way of running your servers for you. You no longer need to have a data center, deal with communications, power, refrigeration, etc… You simply pay for your servers and data center needs on a monthly basis.
This is what’s called Infrastructure-as-a-Service (IaaS), they will run servers for you. It also comes with the possibility of growing almost as easily as moving a dial. Depending on the design you choose it can get as simple as that.

Let’s start with the basics, what can you get from providers? Different sizes of computing units. A virtual machine (or VM) with specs that make sense to you. Who can provide them, well there is a long list… But let me present a list of some of the biggest players:

  • AWS — The service is called “Amazon EC2” and there is a wide range of machines you can choose from. They even have classifications for them: General Purpose, Compute Optimized, Memory Optimized, Storage Optimized, etc…
  • Azure — The name in Azure for this service is quite straightforward: “Virtual Machines”. They also have a wide range and classifications: A-Series, Bs-Series, D-Series, etc… The name is not so straight forward, but they have similar reasoning. For example the F-Series is a compute optimized category.
  • Google Cloud Services (GCS) — They call this service “Compute Engine”. The list of possible machines is quite big as well: General-purpose, Compute-optimized, Memory-optimized, etc…
  • DigitalOcean: They started with a modest offering, but they are now matching their big brothers. Plus their billing mode is less complex, which might be better in certain situations. In this case the name they give to this service is Droplets, and they have a similar range as above.
  • Linode: They also grew and have a similar offering now. They have from basic to complex instances and their offering is also simpler than the big 3 (AWS, Azure & GCS).

The most important thing here is to understand the different offerings. There is definitely a common denominator along all the offerings which is to classify the VMs by tasks. So depending on what the server is going to host, which machine you’ll choose. The offering is similar across providers, but not the same. There might not be a clear winner. Even hosting something as standard as a database can have different behaviors. It could do an intensive use of memory, storage, or both. In general the best is to choose something that makes sense, and then measure its load and response times. Measuring what you effectively use is a big part of using VMs. Even changing VMs types and sizes is something you need to consider not only to cope with demand, but also to make best use of your monthly payments. And that can happen within a provider or even across providers.

Another thing to flag when using VMs from providers is what invoicing model they use, what limits or cap you impose and the impact on performance. Some machines have a flat price (that’s the normal pricing model on Digital Ocean and Linode entry level machines), and some have burstable capacity (like entry level t2 AWS EC2 machines or Azure B-Series). This burstable capacity could come with a cap (which is important if you want to keep monthly cost within a range) or you can let them burst. If you let them burst and the duration of the bursts is considerable, the end cost of the instance is going to be higher than what you anticipated (and higher could be an understatement for huge). If you cap the performance, you can have situations when your machine is not having the response time you would like. There are different answers to this, but the first stop is measuring and having alerts. In both cases you have monitoring solutions within their offering and I strongly suggest you use them. In the case of AWS it is called CloudWatch, and then you have Azure Monitor. Another solution is using flat price machines or simply choosing the right machine for the task. Having burstable capacity is a great idea, but it could come with a huge price tag.

In terms of cost and pricing, another important thing to be aware of is the “pay as you go” model versus commiting and the spot pricing op. This is something AWS (reserved & spot) & Azure (reserved & spot) provide. In the case of spot, you are getting a deal while the provider has spare capacity. The machine you want might not be available, and you might need to return the machine at a point. So it has a particular use case, things you run occasionally. But the difference in pricing could be huge. And when we talk about reserved you are committing for a long period, which reduces your flexibility but it comes with very appealing cost reductions. It all boils down to knowing your workload and being able to predict it as much as possible. Which also shows how important it is to have monitoring in place.

In terms of the IaaS I would probably stop here. The VMs will also need block devices (hard disks) and network services. But I don’t want to get into that here. Lets just say all providers will provide them in some way or another. In the following article we will cover what it’s called Platform-as-a-Service (PaaS) which include things like cloud storage, databases as a service and more.