Optimizing Purchasing Options in the Cloud

Welcome back, this is the 3rd post in our series on controlling and optimizing costs in the cloud. If this is your first time here, I invite you to take a look at the previous posts in this series, Cost Control Analysis Realizes Valuable ROI, and Monitoring, Pruning, RightSizing and Reporting on Cloud Resources.

Cost Reduction

Today, I’d like to dive deeper into controlling costs by evaluating four cloud purchasing options: 

  1. Reserved Instances
  2. Savings Plans
  3. Spot Instances
  4. Enterprise Agreements

The cloud by its nature is designed to support and encourage highly dynamic workloads.  Services like auto-scaling, load-balancers, serverless compute, and a “pay-as-you-go” model encourage the development and deployment of “just-in-time” or on-demand infrastructures, where large portions of your application scale in response to usage (demand). This paradigm is also extremely valuable for development teams building and testing new products and services, and enables rapid prototyping and development of minimally viable products (MVP).

As amazing as the above capabilities are, most businesses will need some minimum level of computing resources across their workloads and accounts. We can refer to this as your “fixed-demand” computing. However, there are still numerous opportunities to optimize spending across your fixed-demand resources.

Reserved Instances

The easiest way to begin saving significant costs is to identify portions of your workload that are fixed-demand and take advantage of reserved instances (RIs). All of the big three public cloud providers, Amazon, Azure, and GCP offer discounts for reserved instances. While AWS and Azure call them “reserved instances,” GCP refers to its program as “committed use discounts.” While the details of each provider’s offering differ, the overall impact is very similar. By committing to a certain workload/ spend over a given amount of time, the cloud provider will offer a lower price.  

When I work with clients to help them evaluate RIs, I almost always start from the position of utilizing the shortest term, lowest upfront pricing option. I start here, because for most clients, I find that the shortest term, lowest up-front costs maximize the benefits of cost savings while maintaining flexibility.  

For example, with AWS, this means I typically start by recommending 1 year, no upfront RIs, which typically delivers around 33% savings compared to their on-demand price. Dependent on client needs we analyze additional RI options. AWS’s RI program allows you to purchase RIs in 1 year and 3 year terms. There are options for zero, partial, or all upfront pricing, with a convertible or standard option. The savings increase as you increase the term-length and pay more upfront. However, for most of our clients, the benefits of maintaining flexibility, minimizing term length, and paying zero out of pocket, more than offset the additional percentage savings. 

Typical Savings of Reserved Instances over On-Demand (OD) Instances:

Instance Type Reserved Reserved
Term-Length 1 year 3 year
Convertible No Yes
Up-Front Payment None All
Typical Savings vs OD  31% 50%

I’m also hesitant to recommend longer-term commitments, as most cloud providers release new instance generations once or twice a year, and you would be better-served upgrading to the newer instances, as they are usually priced lower and offer better performance than the previous generation.  

As always, there are exceptions to every rule or guideline. For example, if your accounting department is able to classify RI purchases as a capital expense, then the depreciation and amortization savings can justify longer-term RIs with the all up-front purchase option. Just be sure to select the convertible option so you can adjust the instance types as needed over the term length.

Savings Plans

Savings plans are currently only offered by AWS, and they are the next evolution/ iteration of reserved instances. There are two types of plans, EC2 instance savings and compute savings. Both plans are designed to help reduce costs across a variety of AWS compute services, such as EC2, lambda and Fargate. Just like RIs, they require you to commit to a 1 year or 3 year period.

The EC2 instance savings plan offers the higher savings of the two plans, compared to on-demand rates, but restricts instance family selection (m5, r4) and region.

The Compute savings plan offers increased flexibility for a lower discount. The compute savings plan offers discounts that apply across families and regions and is applied automatically. This is a nice feature that can help reduce the administrative overhead associated with managing reserved instances.

The recommendations from above regarding term-length still apply, in general, shorter term is better. If you anticipate your workload will change over the commitment period go with the compute savings plans to take advantage of the flexibility.

Spot Instances

Let’s say you have an application that is the opposite of steady-state. The application may require a large amount of compute resources but is architected in such a way that the bulk of the workers can be ephemeral and can come and go as needed. If you have an application like this, then spot instances are an ideal instance type. Spot instances are available at Amazon and Azure, while GCP has a similar concept with their preemptible VMs.  

Spot instances offer deep discounts over the on-demand pricing, sometimes exceeding 90%. Basically, spot instances are a way for cloud providers to monetize some of their unused capacity, by creating a marketplace where these instances can be bid on. Each instance type has a spot pool, and AWS and Azure award instances to the highest bidders. The catch with spot instances and preemptible VMs is they can be terminated with a short notice period (two minutes for AWS Spot and 30 seconds for Azure Spot, and GCP Preemptible VMs).  

For this reason, application architecture is critical to ensure the success of your project. If you want to take advantage of spot instances, architect your application in such a way that any data that needs to be acted on utilizes a queue system, with committed writes to backend storage.  That way, when, and not if your spot instances are terminated out from under you, you can simply wait for pricing to come back down, or you can raise your bid up to the on-demand price, and your application will continue processing where it left off. Utilizing ECS with spot fleet and scaling automation can help make all but the most critical workloads run on spot instances, which can provide dramatic cost savings as compared to running on-demand workloads.

Enterprise Agreement Plans

This option is typically reserved for large enterprise clients, but it’s worth knowing about. Typically these plans offer some fixed discount rate, in exchange for minimum annual spend. They can also include considerations for % growth in spending, commitment term, and for highly visible brands that are willing to participate in marketing and publicity efforts. We can help assess if you may be able to take advantage of these plans.

If you and your IT department are trying to reign in cloud spending, or are frustrated by seeing your cloud spending go up every month, give us a call.  We’d love to talk to you and see if we can help you reduce your cloud spending. Quite often we are able to do this for little or no costs.