6 mins
You have 0 further articles remaining this month. Join LeadDev.com for free to read unlimited articles.

in partnership with

As budgets get tighter, here are three surefire ways to maximize your cloud savings.

Analyst firm Gartner estimates that over half of enterprise IT spending will shift to the public cloud by 2025, as well as projections that cloud spending will exceed $1 trillion by 2026. With so much more of an organization’s operating budget going towards cloud infrastructure, it’s no wonder that prioritizing savings and cost optimization is at the forefront of the minds of engineering leaders. 

As companies continue to grow their cloud footprints, the potential for waste rises, leaving engineering managers with the task of optimizing cloud costs continuously, incentivizing frugality in their developer teams, and collaborating effectively across the business to spot opportunities to save.

Doit AMD

If you are at the start of your cloud cost optimization journey, here are three areas to focus on:

1. Architect for cost

The key to a successful cloud savings strategy starts at the architecture phase. The best way to optimize cloud costs is to select the right infrastructure and cloud services for your workloads. By making good choices at this stage, you also save teams the effort of rightsizing or re-assessing these choices when budgets tighten.

A key decision at this stage is which processor you need. This decision directly impacts the performance and efficiency of your cloud resources. By aligning the processor with the specific requirements of their workloads, companies can optimize resource utilization, prevent overprovisioning, and reduce unnecessary expenses.

Take the AMD EPYC™ for example. General-purpose Virtual Machines (VMs) on Google Cloud powered by AMD EPYC offer on average 13% lower cost over comparable VMs, giving you the ability to cut costs and reallocate those funds to other strategic projects.

Selecting appropriate VM types in the cloud can help lower your costs by optimizing resource allocation and reducing unnecessary expenses. You can start by assessing the characteristics of your workloads to determine the optimal machine types.

2. Maximize discount coverage

Most of your cloud bills will likely be taken up by compute services, making this area the first priority when it comes to lowering costs. 

Public cloud providers typically offer commitment-based discounts in one- or three-year terms, with the longer term option naturally providing the most savings. There are also different types of commitment plans available, centered around the level of flexibility that they provide when it comes to changing your machine types or regions. For example, a 3-year commitment will always offer a greater discount (somewhere between 60-70%) than a 1-year commitment (~25-35%), and one that allows you to change regions or machine types will generally provide less savings than one which locks you in. Therefore, the more accurate you can be with your provisioning, the greater discount you can get. 

Given the need to balance operational and developer flexibility with cost management and overall business goals, it’s rare for even a semi-mature company to have a single type of commitment. Instead, most commitment portfolios are tailored to the specific needs and growth stage of the company, and are a mix of one- and three-year deals.

One way to do this is to cover a baseline of your forecasted workloads with three-year commitments – this can be anywhere from 20-65% depending on the amount of risk you’re willing to take – and then use one-year commitments for  the rest.

In addition to commitment discounts, you can also increase your discount coverage by deploying spot instances wherever possible. These are heavily discounted cloud instances compared to on-demand pricing (~60-90%) that can be reclaimed by the cloud provider with very little advanced warning (as short as 30 seconds). Given the risk involved, these should really only be used on fault-tolerant workloads like containerized workloads, stateless web servers, testing environments, or big data applications. However, when deployed properly, they can unlock significant savings on your monthly cloud bill.

3. Practice proactive cloud governance

Architecting for cost and setting up a well-optimized discount strategy is only half the battle. The remainder lies in constant governance and monitoring strategies to eliminate wasted resources, catch anomalies before they spiral out of control, and properly manage budgets across teams within your organization.

Let’s look at some of the domains within typical cloud governance operations:

Budgeting

Proper budgeting and alerting can head off a lot of problems before they even arise, although it’s often easier said than done. A well-managed cloud budget requires proper collaboration between your different IT teams that are responsible for spinning up new workloads, as well as accurate forecasting about their needs over the course of the next several months, if not years. Adhering to a budget may also require guardrails to prevent one team or application from hogging more than its share of resources over the course of the year.

Anomaly detection

Beyond just budgetary restraints and guardrails, you should also be regularly monitoring for cloud cost anomalies. These can occur for any number of reasons, including human error such as a misconfigured workload, a change made on the cloud provider’s end, or a security breach that leads to unauthorized resource consumption. Regardless of the cause, you can prevent these cost spikes from having a significant impact on your cloud bill – and therefore your business’s bottom line – by constant monitoring and alerting for unexpected cost spikes and quickly remediating them before they grow.

Resource rightsizing

Cloud resource rightsizing is the process of optimizing the allocation of resources in your cloud environment to match the actual needs of your workloads. The goal is to eliminate overprovisioning, where you're paying for more resources, and underprovisioning, which can lead to performance issues. Deploying auto-scaling can greatly help with this, as it ensures that you're using resources efficiently without sacrificing performance during peak periods. 

Cloud storage

While not quite as dominant as compute on your monthly cloud bill, storage costs can quickly ramp up as you scale, which makes it an area that should be regularly audited to ensure that costs are kept to a minimum. Review the different storage tiers that you’re using (e.g. standard, archival, etc.) to save costs on data that isn't frequently accessed. You can also set up lifecycle policies to automatically transition data to more cost-effective tiers when appropriate.

Database optimization

This is another area where costs can start small and quickly spike if not properly utilized. Inefficient queries can lead to increased resource consumption and costs, so you should be regularly analyzing and optimizing your database queries and indexing. Consider using database query optimization tools that can automate the process for you, and like anomaly detection software, flag inefficient queries that could be costing you excess money.

Kubernetes governance

Containerized workloads and Kubernetes orchestration are some of the most complex areas within a cloud environment, and therefore one that requires the most advanced expertise and additional support to maintain.

You can read more about Kubernetes optimization within Google Cloud by downloading this ebook, which outlines the scope of the problem and how you can utilize partners to act as an extension of your internal IT teams.

There is no magic formula for maximizing savings in the public cloud, and a lot of these solutions involve effort, discipline, and collaboration. There is also no one-size-fits-all solution, as the size, scope, and architecture of every cloud environment is different and poses its own unique combination of challenges.

With so many moving parts and areas of expertise that are required, the ultimate answer lies in working with one or multiple partners such as value-added resellers, managed service providers, or individual software vendors, who can help streamline your operations and ease the burden of cloud management. These partners also have deep relationships with the cloud providers themselves, which can help unlock additional discounts or provide access to more resources.

DoiT