8 tips to reduce your cloud hosting costs

Most cloud hosting costs are higher than they need to be for a few recurring reasons: servers larger than the work requires, things left running that nobody uses, and Microsoft licences paid for twice. The eight tips below are in the order we would work through them for a business system on Amazon Web Services (AWS) or Microsoft Azure. The first four cost nothing but time, and in our experience they find most of the savings.

See where the money goes

1. Read the bill by system, not by service

Both providers include cost reports: Cost Explorer on AWS and Cost Management on Azure. Left as they come, the reports group spending by type of service, which tells you that you spent a certain amount on “compute” and little else. Label every server, database and storage account with a tag naming the system it belongs to and whether it is live or test. The reports can then answer the question a manager would ask, which is what the stock system or the customer portal costs each month.

2. Set a budget alert, and know its limits

Each platform lets you set a monthly budget and sends an email when spending passes a threshold, or is forecast to. Treat this as a warning light. It is not a cap. Microsoft’s documentation says that when an Azure budget threshold is exceeded “resources aren’t affected, and your consumption isn’t stopped”, and AWS warns that there can be a delay between a charge being incurred and the notification arriving. Send the alerts to a mailbox that somebody reads, not to the person who set up the account three years ago.

Stop paying for capacity you do not use

3. Size servers from measured use

Cloud servers are often specified by copying the machine they replaced and adding a margin. Look instead at processor and memory use over a full month, including the busiest days. AWS Compute Optimizer and Azure Advisor both produce sizing recommendations from recorded usage. Changing the size of a cloud server takes a restart, so you can step down a size and step back up if it proves too small.

4. Switch off what does not need to run overnight

A test or training copy of the system is needed during working hours, which is roughly a quarter of the week. Both platforms can stop and start servers on a schedule.

Two details catch people out. In Azure, shutting Windows down from inside the server leaves it in a “Stopped” state that is still billed; it has to be stopped from the Azure side, which Microsoft calls deallocating, before the charge for the server ends. And on both platforms the disks of a stopped server are still charged, so an environment that nobody will use again should be backed up and deleted.

5. Commit to the capacity you are sure of

A live server runs all day, every day, and paying the standard hourly rate is the most expensive way to buy that. Both providers offer lower rates in return for a commitment of one or three years: Savings Plans and Reserved Instances on AWS, reservations and savings plans on Azure. Make the commitment after tip 3, not before, because committing to an oversized server locks in the waste.

Both also sell spare capacity at a heavy discount on the understanding that it can be taken back at short notice. AWS, for example, gives a two-minute warning. That suits overnight batch jobs and build servers. It does not suit the server your staff log in to.

Check the licences and the storage

6. Do not pay twice for Microsoft licences

For a system built on Windows Server and SQL Server, the licences can be the largest item on the bill. Three checks are worth making.

  • Licences you already own. If you hold Windows Server or SQL Server licences with Software Assurance, or as subscription licences, Azure Hybrid Benefit lets you apply them to servers in Azure and pay only the base rate for the server. On AWS the rules for bringing your own Microsoft licences are narrower. Ask a licensing specialist before assuming either way.
  • Cores. In the cloud SQL Server is charged by the processor core, so a database server with twice the cores it needs carries twice the licence cost.
  • Editions. Check that nothing is running Enterprise edition where Standard would do. Test and development databases can use Developer edition, which Microsoft provides free for non-production use.

7. Clear out storage, backups and logs

Storage costs little per gigabyte and accumulates quietly. The usual finds are disks left behind by servers that were deleted, snapshots nobody remembers taking, backups kept for ever and log files that have never been trimmed. Decide how long each kind of backup needs to be kept and set that as a rule. Files that must be retained but are rarely read can go into the cheaper archive tiers that both providers offer.

Look at data transfer as well. Both providers charge for data leaving their network, so a large nightly export to the office can cost more than expected.

Make the application need less

8. Fix the software before buying a bigger server

When a system feels slow, the quick remedy is a larger server, and the bill goes up for good. The cause is often a handful of slow database queries or a missing index, and fixing those lets the system run comfortably on a smaller machine. Database performance tuning can cost less than a year of the larger server. The same applies to a web application that holds everything in memory, or reads the same data from the database on every page.

Some changes to the software reduce the bill directly. Documents stored inside the database or on a server’s disk can move to object storage, which is the providers’ low-cost service for files, and that often allows a smaller database server.

When the bill is still too high

If the system is as lean as it can sensibly be and the cost still looks wrong, compare it with the alternatives. In our experience, moving to the other large provider seldom pays for itself when only a few servers are involved, because the cost of the move outweighs the difference in rates. Moving a steady, predictable workload to a rented or owned server sometimes does, and self-hosted or cloud hosted sets out how to make that comparison fairly.

A routine that keeps the cost down

Savings found once tend to drift back. Name one person as responsible for the bill and give them a short monthly routine:

  1. Open the cost report by system and compare it with last month.
  2. For anything that rose, find out what changed.
  3. Read the provider’s sizing recommendations and act on the ones that make sense.
  4. Check that test environments were switched off when they should have been.

Once a year, review the commitments and the licence position together. If you are still planning a move, our cloud migration service includes a forecast of the monthly bill before you commit and a review against the real bill afterwards.

Tell us about your system

Say what it does, what it is built on and what is worrying you. We will reply with what we would look at first and whether we are the right people to help.

Tell us about your system 0800 433 7990 Monday to Friday, 9am to 5pm. A first 20-minute call is free, and we reply to every enquiry within one working day. What happens after you get in touch