Cloud & DevOps
The cloud cost playbook for growing products
Elena Ruiz

Cloud bills rarely explode overnight. They drift. A slightly oversized database here, a forgotten staging environment there, a logging pipeline that keeps everything forever. Each decision is defensible on its own, and a year later infrastructure is the second-largest line in the budget.
The good news is that most of the waste sits in a few predictable places, and removing it rarely requires a re-architecture.
Know what a customer costs
Start with one number: the infrastructure cost of serving a single customer for a month. If you cannot calculate it, tagging is the first project. Label every resource by service, environment and, where it makes sense, tenant.
Once that number exists, cost stops being a finance concern and becomes an engineering metric. A feature that doubles cost per customer is a design problem, and it is far cheaper to notice in a pull request than on an invoice.
Right-size before you optimise
The largest savings are usually the dullest:
- Compute. Most instances run well below capacity. Size for observed load with headroom, not for the peak someone imagined at launch.
- Databases. Check connection counts, slow queries and missing indexes before buying a bigger instance. A scale-up often hides a query that should have been fixed.
- Environments. Staging and preview environments should scale to zero when nobody is using them.
- Storage. Set lifecycle rules on day one. Logs, backups and uploads grow quietly and never shrink on their own.
The cheapest request is the one you never make. Cache it, batch it or delete the code that sends it.
Watch the data paths
Data transfer is the charge teams notice last. Traffic between regions, between availability zones and out to the internet is all billed, and chatty services multiply it. Keep services that talk constantly close together, put a CDN in front of anything static, and compress what crosses the wire.
Commit to the baseline, flex the rest
Once usage is stable, cover the predictable baseline with committed-use discounts and leave the variable part on demand. Run interruptible work, such as batch jobs and CI, on spot capacity. Autoscaling should handle the peaks so that you are not paying for them at three in the morning.
Make it a habit
Cost control is not a one-off clean-up. Put a cost dashboard next to the performance dashboard, set budget alerts that reach the team who can act on them, and review the bill monthly with the same seriousness as an incident.
Handled this way, cloud spend grows more slowly than revenue. That is the real goal: not the smallest bill, but one that stays proportional to the value the product delivers.
KeepReading

Designing multi-tenant SaaS backends that scale
The isolation, data and billing decisions that let a platform grow without a rewrite.

How to ship AI features that survive real users
Evaluation, guardrails and fallbacks: the work that turns a demo into a dependable feature.