How to stop cloud costs escalating


Back in the early days of large-scale cloud computing, the only two things harder than comprehending a cloud provider's price list were the manual for a nuclear power station and Microsoft's licensing scheme.

These days the vendors have made their pricing pages clearer, but this doesn't make it much harder to run up a big bill. Here's how to avoid nasty surprises at the end of the month.

We all know that on a night in the pub you shouldn't mix your drinks, but sadly cloud vendors have a habit of mixing their units. So I see from Microsoft's Azure pricing page that in the Europe North region I can get the first terabyte of storage for 1.53p per gigabyte. Now, when I first read that I thought: “Wow that's cheap” but of course that means that your first terabyte is about £15.67 per month. Not bank-breaking, but worth knowing when you have lots of data.

Understand the pricing of servers

If you're using a provider that charges you much less for a server when it's powered off than when it's up and running, make the most of this: turn stuff off when you're not using it (preferably via a sensible management GUI or even an automated application). Ensure, though, that you know the charging basis. For instance, as Amazon's docs put it, for example: “Each time you start a stopped instance we charge a full instance hour” - that is, don't go mad and have something auto-stopping and auto-starting servers all the time because you won't save a bean.

If, on the other hand, your provider charges you for a virtual data centre with a given volume of CPU, RAM and disk, make sure you size it sensibly: monitor your servers and if you find that you're not up to capacity, turn down the wick and pay a bit less. Better still, start small and expand – some server operating systems get very annoyed at you if you nick processors from them, so it's better to start with one and stick with one than to start with two and then drop one.

Consider also that even if a server's shut down, you'll generally still be charged for the storage: okay, when something's off you're not using the CPU or the RAM, but you're definitely still using the disk.

Vendors offer you multi-tier storage: use it. Say to yourself: “Do I need more than the basic storage service?” Hint: the answer is that if you're not using a socking big database application, then probably not. Provision your virtual machines with multiple disks on different storage schemes if that gives you the best compromise of cost versus size: once you get to a few terabytes you're saving yourself hundreds of pounds a month by using slower disk for apps that don't need bonkers performance.

Watch your backups

This is particularly relevant if you use a specific cloud-based backup service, though it can also be applied to cloud services in general.

It's increasingly common these days for cloud backup services to depart from the traditional model of having a weekly backup then daily incrementals; with disk-to-disk backups it's common to have a single up-front full backup and then incrementals for evermore. This is great as it makes it possible to roll forward and back through point-in-time snapshots, but it does also mean that the more you change your data, the more storage you're occupying.

Ensure you get regular reports, and ensure that you have a rolling regime of consolidating to a “synthetic full” backup every month or so to ensure you're not storing stuff that you'll never go back to. Also consider dumping archive data to an offline disk so you're not paying the provider for evermore to hold your archives.

Use the vendors' portals

Sounds dumb, I know, but the vendors really have made their billing pages much more comprehensible than it used to be.

For example I've just logged into my Amazon Web Services billing page and it's telling me my Current month-to-date balance for July 2014 in socking big 36-or-more-point digits. It's impossible not to know what I owe them, quite frankly, all for the sake of clicking a bookmark in Chrome, entering my credentials, and clicking Billing & Cost Management.

"If you're a one-vendor cloud user the chances are that the vendor's own portal is perfectly adequate to you."

In the interests of fairness I checked out my Azure account as well and the story's the same, except that in this case it says Next bill (estimated) followed by a nice big-font number. To be fair I can download the usage details via a link just below the cost, so that's fine.

If you're a one-vendor cloud user the chances are that the vendor's own portal is perfectly adequate to you. You do have the option of third party price control services, though – for instance Clouadability, DataPipe and Cloudyn. Particularly interesting is that services such as Cloudyn go a step further than showing you your costs – they know the pricing models of different vendors and are able to show you “what if” cost models if you were to shift your installation to a different vendor.

It's pretty easy, then …

Preventing your cloud costs escalating unnoticed is actually pretty easy:

  • Make sure you understand the pricing model and the units on the price list.
  • Be judicious with storage – it's the bit that mounts up the cost fastest.
  • Don't let the backups get out of hand, and consider taking data off the cloud for archiving.
  • Make the most of the fact that the vendors' pricing portals are actually pretty clear – just opening your eyes and clicking a couple of times shows you your current outstanding cost.
  • Use a third party portal where it's sensible to do so (generally if you have a multi-vendor setup) and try the “what if I were to move” tools like Cloudyn.

Oh, and one more thing: there's no point trying to stop your cloud costs escalating if in fact the starting point is more expensive than it needs to be.

Be prepared: before you choose your provider get out the modelling tools and your calculator to understand what you'll be paying on day one. After all, what's the point worrying that your storage costs are growing when you couldn't actually really afford them on day one anyway?