DEV Community

Cover image for Ultimate cloud pricing comparison: AWS vs. Azure vs. Google Cloud in 2021
CAST AI
CAST AI

Posted on • Originally published at cast.ai

Ultimate cloud pricing comparison: AWS vs. Azure vs. Google Cloud in 2021

How can you tell which cloud provider is the right one for your business? And which one isn’t going to break your wallet?

On the surface, AWS, Microsoft Azure, and Google Cloud are pretty similar. They all offer flexible compute, storage, and networking combined with everything engineers love about the cloud: self-service, instant provisioning, and autoscaling. 

But cloud providers differ in key areas that have a massive impact on your cloud bill.

Most of your bill consists of compute resources that represent even 75%-80% of a company’s cloud spend. That’s why I will focus on comparing the pricing of Instances and Virtual Machines across AWS, Azure, and Google Cloud to show you the nuanced differences between these providers.

Read this guide to learn which provider offers the most cost-effective services in 2021:

  1. Top strengths of AWS, Azure, and Google Cloud
  2. Billing in AWS vs. Azure vs. Google Cloud
  3. Let’s take a look at the biggest cost driver: compute
  4. Comparing On-Demand pricing
  5. Comparing discounted pricing with 1-year upfront commitment
  6. How CPU bursting can help drive your costs down
  7. Comparing Spot Instances/Preemptible VMs
  8. Optimizing cloud costs is a point in time exercise
  9. That’s exactly the reason why you need automation to optimize cloud costs

Cloud landscape overview: Top strengths of AWS, Azure, and Google Cloud

Selecting one vendor over another comes down to knowing what your teams, applications, and workloads need. You need to have a full understanding of your requirements before setting out to explore the cloud landscape.

Next, it’s time to examine each provider separately. The thing is, AWS, Azure, and Google Cloud come with different strengths and weaknesses.

AWS is the leader for a good reason

Let’s start with AWS that currently holds the largest chunk of the cloud market. Its undeniable strength is the sheer breadth and depth of its services. You can choose from almost 400 instance types and pair them with a rich array of tools for databases, analytics, management, IoT, security, and enterprise applications. This list could go on almost forever.

AWS is the winner when it comes to developer functionality thanks to the breadth of its services and ability to translate this scale into cost benefits. Still, this complexity comes at a cost. One of the common pricing challenges companies face is understating AWS metrics and estimating the impact of architectural decisions on costs.

Azure is the go-to choice for enterprises

Microsoft Azure is quite a popular choice with C-level executives. That’s usually because they have a long-standing relationship with the provider and meeting all their enterprise computing needs in one place makes sense. 

The combination of Azure, Office 365, and Teams makes a safe option for enterprises looking to benefit from enterprise software all the way down to cloud computing resources with a single handshake.

Google Cloud taps into the power of open source

All three major cloud vendors are strong in machine learning capabilities. But Google stands out among them thanks to its endless well of internal research and expertise - basically, the magic powering the search engine giant throughout the years.

What makes Google different is its role in developing various open source technologies. I’m talking especially about containers and Google’s central role in building Kubernetes for orchestration and the Istio service mesh, today practically industry-standard technologies.

Google’s culture of innovation lends itself really to startups and companies that prioritize these approaches and technologies. 

Naturally, companies often end up using different cloud providers for different parts of their operations or use cases. This multi cloud approach lets them bring the best of all the (cloud) worlds together under one roof. 

Billing in AWS vs. Azure vs. Google Cloud

Per second billing is now something all the three cloud vendors offer. AWS introduced it in 2017 for EC2 Linux-based instances and EBS volumes at first - but today, it applies to many other services. Note that in AWS, per-second billing works with the minimum 60-second limit. 

Azure allows per-second charges as well, but this billing model isn’t available for all instances - mostly container-based instances. 

Google Cloud followed AWS in the introduction of per-second billing and now offers it for more than just instances based on Linux. In Google, this form of billing applies to all VM-based instances.

Let’s take a look at the biggest cost driver: compute 

Compute is what makes your cloud bill so high. This isn’t to say that other services don’t contribute to it at all. Storage can get quite expensive and moving data around might result in high egress costs. 

But it’s compute that comes with the biggest price tag - and greatest opportunity for cost optimization.

Here’s a case study that shows the incredible impact optimizing compute costs can have on a company’s bottom line.

How Netflix slashed its cloud costs by picking different machines

To deliver its video streaming services across 190 countries, Netflix uses Amazon EC2 instances and Kinesis data streams. Recently, Netflix turned to the Graviton2-based EC2 instances. Switching to these brand-new machines helped Netflix improve performance by 50% and cut costs. 

Before, the company used m4.16xlarge instances that cost $3.2/hour. Now, Netflix uses m6g.16xlarge that costs $2.464/hour, and m6g.xlarge priced at only $0.0154/hour. 

You can only imagine the cost savings Netflix enjoyed on its cloud billing. This example clearly shows how a minor difference in instance pricing can save you thousands of dollars. 

Comparing cloud pricing - our example setup

To understand the pricing differences better, we’re going to compare instances and VMs within one region and across the same operating system.

This is our example setup:

  • Region: US West - Los Angeles (US West in Azure, US West 2 in Google Cloud)
  • Operating System: Linux 
  • vCPUs: 4

Types of instances/VMs we will analyze:

  • General purpose
  • Compute optimized
  • Memory optimized

For our comparison, we chose instances with similar RAM and 4 vCPUs. The obvious exception is Google Cloud’s memory-optimized instance that starts at 40 vCPUs.

Here are the instances/VMs we selected for our cloud pricing comparison:

Alt Text

AWS vs. Azure vs. Google Cloud: Comparing On-Demand pricing 

Here is the hourly On-Demand pricing of each of those instance-type scenarios across AWS, Azure, and Google Cloud.

Cloud pricing based on On-Demand rates

Alt Text

Note: In the above table, red marks the highest price and green the lowest price for a given instance type. 

Takeaways:

  • As you can see, AWS and Azure offer quite a similar pricing for all these three instance types. 
  • For compute optimized instances, Google Cloud has the highest pricing due to its scalable processors and all-core performance. 
  • The cost of Google Cloud for memory optimized instances is way higher because it doesn’t run on 4 vCPUs, but 40vCPUs.

A note about chips and processors 

Providers roll out instances on different computers and the chips in them have different performance characteristics. So, you might end up with an instance type that has strong performance your teams don’t actually need, and you’ll have no idea about this.

Reasoning about this on your own is challenging and the best way to see what you’re really paying for is via benchmarking. The idea here is to drop the same workload on each machine and check its performance characteristics. 

You might discover something interesting, just like we did:

This chart shows CPU operation in AWS (t2.2xlarge with 8 virtual cores) at different times after several idle CPU periods. Would you expect such unpredictable CPU behavior within a single cloud provider?

AWS CPU behavior

Source: CAST AI

The 2021 Cloud Report from CockroachLabs used the same method to evaluate 54 machines across AWS, Azure, and Google Cloud. They ran over 1000 microbenchmark tests to evaluate metrics like CPU, network, storage, and TPC-C performance.  

One of their overall conclusions was that Google beats AWS and Azure on performance. It achieved the best single-core CPU performance and offered the greatest throughput at every level. Google’s machines with general purpose disks achieved the highest level of raw throughput but turned out to be the least cost-efficient option.

AWS vs. Azure vs. Google Cloud: Comparing discounted pricing with 1-year upfront commitment

All three providers offer discounts if you commit to using them for at least 1 year. The pricing model is called Reserved Instances/Savings Plans in AWS, Reserved Savings in Azure, and Commitment Price in Google Cloud. 

These discounts incentivize businesses to commit to a specific level of usage for a fixed period in exchange for a discounted rate on some (not all) instances and VMs. 

To compare the discounted pricing among AWS, Azure, and Google Cloud, we examined a one-year commitment period without upfront cost - but this time, in another region: US East - Northern Virginia.   

Cloud pricing with 1-year commitment

Alt Text

Takeaways: 

  • The general-purpose instances with a 1-year commitment are almost similar in AWS and Azure.
  • AWS wins in the compute optimized category, even if Azure and Google apply some pretty big discounts.
  • Azure offers the cheapest alternative among memory optimized instances.

Not sure how Reserved Instances work and whether they really translate into discounts? Read this: Do AWS Reserved Instances and Savings Plans really reduce costs?

How CPU bursting can help drive your costs down

AWS, Azure, and Google Cloud all offer burstable performance instances. These instances provide you a baseline level of CPU performance, with the opportunity to burst to a higher level whenever your workload requires that.

Burstable performance instances are a good pick for low-latency interactive applications, microservices, small and medium databases, or product prototypes.

But to make the most of them, you need to keep a close eye on the credits you collect that enable bursting. For example, if you restart a T2 instance in AWS, you’re going to lose all the credits. Restarting a T3 or T4 instance means keeping credits for another 7 days and then losing them. 

Our research into AWS burstable instances showed that if you load your instance for 4 hours or more per day on average, you’re actually better off with a non-burstable one. But if you run an e-commerce business that gets a large stream of visitors once in a while, it’s a good match.

AWS vs. Azure vs. Google Cloud: Comparing Spot Instances/Preemptible VMs

Here’s another way to reduce your cloud bill - take advantage of capacity that’s currently not being used by any businesses. Cloud providers sell this excess capacity at incredibly high discounts - while AWS Spot Instances offer up to 90% off the On-Demand rates, Preemptible VMs in Google can be even 80% cheaper than regular VMs.

Here’s a quick overview of the potential savings you can get for these instances in the US East - Northern Virginia region:

Cloud pricing with Spot Instances/Preemptible VMs

Alt Text

As you can see, all providers offer substantial discounts on these instances. 

But to take advantage of these savings, you need to make sure that your applications can handle interruptions. How? Here’s a step by step guide: Spot Instances: How to reduce AWS, Azure, and GCP costs by 90%

Optimizing cloud costs is a point in time exercise

By now, you’ve learned the basics of calculating compute charges. But Spot instance prices don’t always stay the same. In fact, they might change from one second to the next.

Take a look at this example:

At CAST AI, we were running an application on a mix of AWS On-Demand instances and Spot Instances. Then we used our own platform to analyze our setup. The platform looked for the most cost-effective Spot Instance alternatives for a machine with 8 CPUs and 16 GB.

CAST AI suggested that we run our workload on an instance called INF1. But wait, why would we need a powerful GPU instance meant for machine learning applications? It’s a supercomputer that usually costs a lot of money.

Alt Text

So, why did CAST AI pick it? We checked the pricing. As it turns out, at that time INF1 just happened to be cheaper than the usual general purpose instances we used. 

We would have never guessed to look for Spot Instances in this category. As a result, we’d miss out on this incredible gem.

That’s exactly the reason why you need automation to optimize cloud costs

Even if you have DevOps or FinOps specialists managing your cloud expenses, you're probably spending twice as much as you should. It's high time you took control of your cloud bill with the help of automation and AI.

CAST AI is a great place to start your path towards automated optimization if your teams work with Kubernetes. The solution automatically creates and implements cost-cutting tactics for guaranteed savings without any manual and repetitive work for your engineers.

Schedule a demo to learn how automation can reduce your cloud bill to the minimum regardless of the cloud provider you are working with.

Top comments (0)