Select the directory option from the above "Directory" header!

Menu
12 ways to slash your cloud costs

12 ways to slash your cloud costs

You can cut your cloud bill by 30 percent, 40 percent, and maybe much more if you know where to look.

Credit: Supplied

The cloud began as an economic proposition. Servers are expensive and so are the air conditioned rooms and the fat internet connections that servers need to thrive. Why not just rent them and stop paying the big bills for hardware and the staff to care for it? The big cloud data centers can save on scale and then pass this savings on to the rest of us.

Now more than a decade later, those slices have started to add up. Companies are easily spending millions of dollars on these tiny instances. The list price may be a few pennies per hour, but the developers use so many that the total sends the CFO grasping for heart medication.

Here are 12 different options to start saving. Some involve substituting cheaper parts. Others involve cutting out some parts altogether. Many involve improving communications so the developers and devops team can make more financially savvy decisions. None are perfect. All of them involve trade-offs. None of them work for every situation. But all are worth considering.

Turn to commodity cloud providers

The big cloud companies offer a staggering array of options—including some absolutely top-flight services for both mundane jobs like data storage and exotic jobs like machine learning or computer vision. But if you’re not going to be using all of the very best APIs and services, you can find commodity cloud brokers that sell more or less the same thing for much less. Companies like LinodeDigitalOceanVultrHetznerScaleway, and LightSail can be cheaper, especially for simple loads.

Find major cloud discounts

No one needs to pay list prices at big cloud companies. AWS, for example, offers discounts for longer term commitments through reserved instances. Their spot market can be a good place to run background processing when prices drop at odd hours. Google offers automatic discounts that kick in the longer your machine stays running. The list prices are made for people who want instant gratification and machines that boot at the snap of a finger. Planning ahead and searching for discount options is one of the simplest ways to pay less for the major clouds.

Craft hybrid clouds

Not everyone has good machines with spare cycles just sitting around their office, but those who do can take advantage of increasingly sophisticated software packages for building secure subnets that link them together. Machines that you own can be much cheaper, and maybe even a tad more secure.

TailscaleSubmariner, and Traefik are just some of the options for building this secure mesh out of a mixture of public cloud machines and anything sitting around gathering dust. Some are building out Kubernetes clusters. Others are just hosting back-end services that don’t need low latency. It’s not a solution for customer-facing workloads where the customers count the milliseconds as they wait, but it’s easier than ever to cobble together something useful for background processing.

Explore bare metal servers

Not everyone needs the flexibility of the modern cloud instances. Some providers are renting out full servers without the extra layers of hypervisors and virtualization. Your code gets the whole machine, something that also comes with fewer worries for security. You get the real root password. You might need to do a bit more work on curating the OS layer, but sometimes that brings the opportunity to do a better job of tuning the machine. IBMOVHcloudGTHost, and Vultr are just four of many companies that rent out bare-metal servers. Or you could buy your own.

Break down the bill and mind the parts

Some cloud users melt down when they get the monthly bill because their applications are heavy data users. Some clouds charge for data exfiltration and this can add up, especially if your content goes viral. Other companies like Cloudflare are deliberately building out networks that don’t charge for exfiltration. So look carefully at your application’s profile. Are you a heavy user of networking, data storage, or one particular line item on the bill? There’s a good chance that some other cloud company has a better formula for you.

Also on InfoWorld: How Docker broke in half ]

Stop paying extra for data storage

A few cloud companies like Backblaze or Wasabi specialize in low-priced data storage, boasting charges as much as 80% lower than the major clouds. The savings can be larger too because they have different fee structures for data movement, allowing you to save on data exfiltration. These companies also offer an Amazon S3-compatible API that makes switching simple.

Go static

If your application is heavy on unchanging information, applications built out of static web pages can be the cheapest way to reach a wide audience via a content distribution network. They’re not a great solution for tasks that require plenty of back-end computation and customization, but maybe that processing could be split off into a separate service. Good static frameworks include JekyllGatsbyMiddleman, and Hugo. Programmers routinely talk about cutting costs by a factor of 10 or 20 when they can move everything to a CDN.

Go serverless

The cloud is usually best for applications with big spikes in demand. If your application sits largely idle for hours or even days, then rewriting it to run in a serverless framework like Cloudflare Workers or AWS Lambda will mean you won’t be paying for all of that downtime. Nor will you be paying as much when the load is low.

Recompile for Arm

AWS and some other cloud vendors are adding new servers built around Arm CPUs. These RISC chips can be faster and cheaper but they often require you to recompile any binary applications. The savings depend upon the type of application and the load on the machine. AWS, for instance, estimates that its Graviton chips may be 25% to 100% or more efficient than their x86 counterparts. The speedup could grow because AWS just rolled out the new Graviton3 processor, which the company estimates may be three times faster than Graviton2, at least in one benchmark for machine learning applications relying upon bfloat16 values.

It may not be easy to capture this value unless your server is running a full load, a proposition that makes some devops folks a bit nervous. One solution is to start using the Arm chips for background processing that runs full tilt. Another is to move to an event-driven compute service that offers Arm processors, like AWS Lambda, a solution that one intrepid coder found could be 20% cheaper, but only for some languages and applications. It’s time to start benchmarking.

Go tiny

The number of Arm options is growing quickly and sometimes in surprising ways. Many of us learned to hack with the tiny Raspberry Pi or Jetson machines that cost next to nothing. They’re ideal for building embedded machines, Internet of Things applications, or just experimenting. Now they can be part of your cloud infrastructure too. Raspberry Hosting and miniNodes, for instance, will rent you a tiny Raspberry Pi or Jetson Nano board in a professional data center with a fat internet connection so you can run basic software at a low price.

Watch default configs

Many cloud instances come in default sizes that make configuring them easier. In many cases, our code doesn’t need all of the storage but we get to keep paying for it. Several months ago, my cloud bill was almost doubled by local storage that I wasn’t using. To make matters worse, the cloud companies often make it tricky to shrink this unused space. If you’re vigilant during creation, you can often start with just enough space to run your application.

Also on InfoWorld: Will Google Cloud ever win over enterprises? ]

Make costs apparent to everyone

I still remember the look on the manager’s face when I asked for my own test cluster because I was constantly bumping into another programmer. His mouth said he would look into it, but his face said that this was a costly and unreasonable request. But how was I to know? The developers on my team never saw any of the costs because the devops team handled all of those details.

Sharing the costs helps the engineers understand that the pennies per hour add up quickly when some Kubernetes cluster scales up to shoulder some load. It may not be easy or even possible for the developers to shrink costs, but they’re less likely to suck up more cloud machines if they know the price.

Hire an official cost engineer

There’s nothing like putting the responsibility in someone’s title to make it clear what the primary focus should be. Some teams are designating some developers as “cost engineers” whose job it is to look for ways to save money on the cloud bill. Maybe this means tweaking some microservice to use less RAM. Maybe this means moving some occasional task to a serverless configuration. There are dozens of good hacks to be found. Telling a developer that their job metric will be tied to the cloud bill is a good way to shift the focus to saving money.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Show Comments