The cloud cost model: what you actually pay for
Tuesday, 9:00: StayHub's September cloud bill is €310k, up from €140k a year ago, and Karim has to explain it to the CFO on Thursday. Bookings grew 71%. The bill grew 121%.
A cloud bill isn't just "the servers". It's many meters ticking at once. Here's what each one counts, and the question to always ask.
- Problem
The monthly cloud bill went from €6k to €19k in a year. Nobody can say why, or whether that is good or bad.
- Why the simple system fails
Looking only at instance prices misses most of the bill: data transfer, storage IOPS, idle environments, managed-service premiums, and the engineers' time it all takes.
- Engineering concept
Model cost per resource type, make every euro attributable to a team and feature, and judge it per unit of business value rather than as a total.
- Technology
On-demand vs reserved, savings plans and spot pricing; cost allocation tags; budgets and anomaly alerts; unit economics dashboards.
- Trade-offs
Commitments save money but reduce flexibility; spot is cheap but interruptible; managed services cost more per hour but less in people time.
The problem
2 min- Karim · CTO€310k this month. A year ago it was €140k. The CFO wants an explanation on Thursday.
- Maya · Product managerBookings went from 1.75M to 3.0M a month. Isn't a bigger bill just success?
- You · Engineer at StayHubWe also opened Virginia. Probably the servers?
The big idea
4 minA cloud bill is many meters, and a total means nothing alone: always ask cost per what?
A house has separate meters for electricity, water and gas. Everyone watches electricity, but a water leak in the basement can cost just as much. You only find it by reading every meter.
How it works
5 min- 1Compute (€95k)
A meter is one thing the cloud counts and charges for. Compute is paid per hour switched on, busy or idle. Our fleet averages 22% CPU.
- 2Databases (€80k)
A : instance hours × replicas, plus storage, and backups. Virginia added replicas: +129%.
- 3Logs & metrics (€52k)
Paid per GB sent in and per day kept. Grows with every new log line, not with traffic: +247% (debug logging left on).
- 4Egress + NAT (€45k)
: data leaving the cloud or crossing regions, paid per GB. Every database write copied to Virginia: +200%.
- 5People time (not on it)
The engineers who patch, upgrade and get paged. Often the biggest cost, never on the invoice: compare .
- 6Unit cost and price levers
: €140k ÷ 1.75M = €0.08 per booking; €310k ÷ 3.0M ≈ €0.10. To lower the price of the same usage: a (1–3 years, big discount) or (deeper discount, machines taken back with little notice).
Watch a decision being made
4 minLina explains (and cuts) the €310k bill
Karim needs an explanation and a plan for the CFO by Thursday, without hurting reliability.
- 1Find what grew faster than bookings
Against +71% bookings: logs +247%, egress +200%, databases +129%, compute +73%. Compute is in line; the other three are not.
Why: Lines growing with the business are healthy. Lines growing faster are where the waste lives.
- 2Give every euro an owner
35% of spend has no tag. Enforce
team,envandfeaturein infrastructure code; alert on untagged spend.Why: Untagged money has no owner, so nobody turns it off. The 40 always-on preview environments were found this way.
- 3Shrink, then commit
Cut DEBUG logs and 90-day retention (logs → ~€22k), preview environments off at night (−€6k), from 22% to ~50% CPU (compute → ~€55k). Then a savings plan on the new floor.
Why: A commitment bought before rightsizing locks in paying for idle machines for three years.
- 4Name the business decisions
Most egress comes from copying every write to Virginia. Dropping that replica saves a lot, but slows recovery if Frankfurt fails. That goes to Karim as a choice.
Why: Some costs buy safety. Engineers price them; the business decides.
In real life
3 minNetflix: all in on the public cloud
- Publicly described finishing its move from its own data centres to AWS around 2016
- Traffic swings through the day, so paying per hour fits
Fits when demand moves a lot.
Dropbox: storage on its own hardware
- Publicly described moving most user files from AWS to its own storage around 2016
- Huge, steady, predictable storage; needed a dedicated team
Fits when one steady workload dominates and you can staff it.
What goes wrong
3 minEgress, IOPS, NAT, logs and support can be half the bill.
Model every meter of a design, plus people time.
Three years of paying for a fleet at 22% CPU.
Tag, shrink and rightsize first; commit to the steady floor.
A growing bill can be healthy; a flat one can hide a shrinking business.
Track cost per booking monthly, next to latency and errors.
Trade-offs
3 min| Pricing | Relative price | Fits | Risk |
|---|---|---|---|
| On-demand | 100% | New or unpredictable workloads; peaks | Full price for flexibility |
| Savings plan / reserved | ~40–80% | Steady baseline for 1–3 years | Paying for commitment if you shrink |
| Spot / preemptible | ~10–40% | CI, batch, retryable workers | Taken back with little notice |
- Karim · CTOFinance can sign a 3-year savings plan on all of today's compute tomorrow. 40% off, about €38k a month saved from day one.
- Lina · Senior engineer, your mentorOur fleet is at 22% CPU. Rightsize first, then commit to the smaller fleet.
- Karim · CTORightsizing takes six weeks. That's six weeks at full price.
Your job as tech lead
4 minClaude Code can write the code for this. You still own the decisions, and you have to know what good looks like to accept or reject its work.
- The number you manage: cost per booking (€0.08 → €0.10), not the total.
- The order of savings: see (tags), shrink (, idle preview environments), commit last ().
- What may be deleted or resized, and by whom: an agent proposes, a human approves each change.
Our cloud bill went from €140k to €310k a month while bookings grew 71%. Read only: don't create, resize or delete anything. From finance/billing-2026-09.csv and our infrastructure code, table the top 15 cost items: what each is, its owner (from tags, or a guess marked as such), monthly cost and meter. List untagged and idle-looking resources separately. Compute cost per booking for both Septembers. No commitment recommendations yet.
- The lines add up to €310k.
- Owners marked as guesses are confirmed by a human before anything changes.
- Every command Claude ran was read-only; "idle" comes with 30 days of evidence, not one afternoon.
- It recommends a 3-year commitment on the current fleet before rightsizing.
- It proposes moving the production database to spot to save 70%.
- It ignores logs (€52k) and egress (€45k), which grew fastest.
Check yourself
2 minNext episode: Karim asks how much the new availability service will cost before anyone writes a line of it, and two designs are on the table.
Mark it complete to update your skill map.
Go deeper (optional)You don't need this to understand the lesson. Open it when a project needs the details: Technical deep dive, Interactive simulation, Visual diagram, Analogy, Check your understanding, Practice ladder, Explain it yourself.
Technical deep dive
Pricing models for the same compute. The numbers are illustrative relative values; real discounts vary by provider, term and region.
| Model | Relative price | Commitment | Risk | Fits |
|---|---|---|---|---|
| On-demand | 100% | None | You pay full price for flexibility | New or unpredictable workloads; the peak above your baseline |
| Savings plan | ~60–80% | €/hour of spend for 1–3 years | Paying for unused commitment if you shrink | Steady baseline that may change instance types |
| Reserved capacity | ~40–70% | A specific resource for 1–3 years | Locked to a size or region you may outgrow | Databases and other stable, long-lived resources |
| Spot / preemptible | ~10–40% | None | Taken back with little notice | CI runners, batch jobs, stateless workers that can retry |
| Serverless | Per request / per ms | None | Expensive at steady high volume | Spiky or low-volume workloads; scale to zero |
Lina explains (and cuts) the €310k bill
The bill went from €140k to €310k in a year while bookings went from 1.75M to 3.0M. Karim needs an explanation and a plan for the CFO by Thursday, without hurting reliability.
- 1Turn the total into a unit
€140k / 1.75M = €0.08 per booking last year. €310k / 3.0M = €0.10 now. Each booking costs about 30% more.
Why: A total that grows with the business is fine. A unit cost that grows means something is wasting money, and it's the number the CFO actually needs.
- 2Split the bill by meter
Compute €95k, databases €80k, logs €52k, egress + NAT €45k, CDN + storage €26k, support + misc €12k.
Why: Each meter has a different cause and a different fix. A single total hides all of them.
- 3Find what grew faster than bookings
Compare each line with the 71% booking growth: logs +247%, egress +200%, databases +129%, compute +73%. Compute is in line; the other three are not.
Why: Lines growing in step with the business are healthy. Lines growing faster are where the waste lives.
- 4Give every euro an owner
35% of spend has no tag. Enforce
team,envandfeaturetags in the infrastructure code, and alert on untagged spend.sqlSELECT tag_team, SUM(cost_eur) AS eur, ROUND(SUM(cost_eur) / 3000000, 3) AS eur_per_booking FROM billing_line_items WHERE month = '2026-09' AND tag_env = 'prod' GROUP BY tag_team ORDER BY eur DESC;Why: Untagged money has no owner, so nobody turns it off. The 40 preview environments were found this way.
- 5Shrink, then commit
Cut DEBUG logs and 90-day retention (logs €52k → ~€22k), switch preview environments off at night (−€6k), rightsize the fleet from 22% to ~50% CPU (compute €95k → ~€55k). Then put a savings plan on the new steady floor.
Why: A commitment bought before rightsizing would lock in paying for idle machines for three years.
- 6Name the business decisions
Most of the egress comes from copying every database write to Virginia. Dropping that replica would save a lot, but it changes how fast we recover if Frankfurt fails. That goes to Karim as a choice, not a quiet cut.
Why: Some costs buy safety. Engineers should price them, the business should decide.
Interactive simulation
Visual diagram
Where the money goes in a hotel booking SaaS (illustrative €19k/month). Click a component for its meter.
Analogy
- Running a hotelStaff paid per shift, busy or notThe cloud billCompute
- Running a hotelBasement full of old furnitureThe cloud billStorage and forgotten backups
- Running a hotelDelivery fee whenever something leavesThe cloud billEgress: data going out
- Running a hotelOutsourced laundryThe cloud billManaged services
- Running a hotelPermanent staff vs day workersThe cloud billReserved vs spot capacity
- Running a hotelCost per occupied room-nightThe cloud billCost per booking
Where the analogy breaks: a hotel can't hire 100 staff for one hour. The cloud can add 100 servers in minutes, which is powerful, and an easy way to burn money by accident.
Check your understanding
Select all that apply.
Practice ladder
Trace the meters of one feature
Estimation Warm-upMaya's team launches price alerts: guests get an email when a hotel's price drops. The design:
- 4 always-on app instances at €300/month each, on-demand
- A worker checks 2M saved alerts every hour and writes one log line per check, about 0.5 KB each
- Each alert email links to a hotel page with 2 MB of photos; the photos are served from the origin, not the CDN. Expect 3M clicks a month.
- Illustrative prices: logs €0.50/GB ingested, origin egress €0.08/GB
Trace which meters this feature turns on, and estimate each one per month.
Finish Lina's cost note for the CFO
Decision PracticeLina's note for Thursday has two gaps. Fill in steps 3 and 5.
- Unit cost: €0.08 per booking last year, €0.10 now.
- By meter: compute €95k, databases €80k, logs €52k, egress + NAT €45k, CDN + storage €26k, misc €12k.
- What grew faster than bookings (+71%): ___
- Owners: enforce tags; 35% of spend is untagged today.
- Plan, in order: ___
- Business decision: the Virginia replica costs a lot of egress but protects us if Frankfurt fails. Karim decides.
The photo pipeline bill
Estimation PracticeHotels upload about 400k photos a month. A pipeline resizes each one into 5 sizes. Today it runs on 10 on-demand machines, 24/7, at €400/month each, and the machines are busy only from 01:00 to 05:00, when a nightly batch runs. Resized photos go to object storage; originals are kept forever in the same "hot" storage tier.
Omar says the pipeline costs €4,000/month in compute plus a storage line that grows every month. Propose changes to cut it, with rough numbers and the risks.
Self-host the search cluster?
Decision StretchThe managed search service costs €14k/month. Karim found that running the same cluster yourself on reserved VMs would cost €6k/month. StayHub has no search specialist. Upgrades, backups and node failures would fall on the platform team (4 people), and Omar estimates it at about 40% of one engineer, plus being on call for it. A fully loaded engineer costs about €10k/month.
Write a short decision: "We chose X over Y because…, accepting the risk of…", and say what would make you change your mind.
Explain it yourself
Your manager asks: 'Why is our cloud bill €310k a month when servers are only €95k of it?' Explain where the money goes and how you'd know whether it's too much.