The biggest infrastructure saving our team ever delivered was 60% of an enterprise cloud bill. Almost none of it came from negotiating with the provider. It came from small, boring changes to how the software behaved, and I handle the finances at our company, so boring savings are my favourite kind. Here are the changes we look for first, because they appear in almost every codebase we audit.
The missing database index
A query without the right index reads the whole table. With the index, it reads a few rows. Same result, thousandfold difference in work, and the database bill pays for that work. Adding an index is often one line. We have seen query optimisation deliver tenfold speedups this way, and the speed is only half the win: a database doing 1,000 times less work is a database you stop upgrading every six months.
The query that runs a thousand times
The N+1 pattern is the classic: fetch a list of 1,000 orders, then run one extra query per order for the customer name. One page load, 1,001 database round trips. The fix is to fetch the names in a single query, and it usually changes a handful of lines. Pages get faster, the database gets quieter, and the auto-scaler stops spinning up servers to handle load that never needed to exist.
The answer nobody cached
Some data barely changes but gets computed on every request: product lists, configuration, exchange rates, dashboard aggregates. A cache layer answers those requests from memory instead of recomputing them, and the compute bill drops in proportion. On our GraphQL platform, Redis caching is part of how 10,000 concurrent users get sub-100ms responses without a server farm behind them.
The servers sized for a peak that never comes
This one is configuration rather than code, and it is the most common of all. Machines get provisioned for launch-day optimism and never revisited, so companies pay every month for capacity they touch once a year. Right-sizing plus auto-scaling means you pay for the traffic you have, with headroom that arrives when traffic does. This was the largest single slice of that 60% saving.
The logs nobody reads
Logging costs money twice: once to store, once to search. Systems that log every request body at full verbosity accumulate terabytes of noise, and the bill grows with it. Log hygiene (keep what answers questions, sample the rest, expire the ancient) is an afternoon of work that trims a line item forever. It also removes sensitive data you probably never meant to store, which is a security win wearing a cost-saving costume.
Why this is a finance topic, not just an engineering one
Every change above is invisible in a demo. The software works identically before and after, which is why these issues survive: teams under feature pressure have no reason to look. But the monthly bill is a recurring cost, so a small fix compounds the way a subscription does. A few days of audit that cuts RM 3,000 a month is worth RM 36,000 a year, every year, for one engagement.
If your cloud bill has grown quietly and nobody can fully explain it, that is normal, and it is fixable. Our cloud and DevOps team runs these audits as a standalone engagement. Send us a recent bill and we will tell you honestly whether there is enough waste to justify the work.