Skip to content
Episode 94 · The €310k bill

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.

30 min intermediateWhat you actually pay for in the cloudData transfer (egress) costsReserved capacity, savings plans and spotCost tagging and unit economicsTotal cost of ownershipPay-per-use vs provisioned cost
  1. Problem

    The monthly cloud bill went from €6k to €19k in a year. Nobody can say why, or whether that is good or bad.

  2. 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.

  3. 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.

  4. Technology

    On-demand vs reserved, savings plans and spot pricing; cost allocation tags; budgets and anomaly alerts; unit economics dashboards.

  5. Trade-offs

    Commitments save money but reduce flexibility; spot is cheap but interruptible; managed services cost more per hour but less in people time.

01

The problem

2 min
Tuesday, 9:00. The September invoice just arrived.
  1. Karim · CTO
    €310k this month. A year ago it was €140k. The CFO wants an explanation on Thursday.
  2. Maya · Product manager
    Bookings went from 1.75M to 3.0M a month. Isn't a bigger bill just success?
  3. You · Engineer at StayHub
    We also opened Virginia. Probably the servers?
02

The big idea

4 min
Where €310k really goes
The big idea

A 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.

03

How it works

5 min
The meters on StayHub's bill
  1. 1
    Compute (€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.

  2. 2
    Databases (€80k)

    A : instance hours × replicas, plus storage, and backups. Virginia added replicas: +129%.

  3. 3
    Logs & 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).

  4. 4
    Egress + NAT (€45k)

    : data leaving the cloud or crossing regions, paid per GB. Every database write copied to Virginia: +200%.

  5. 5
    People time (not on it)

    The engineers who patch, upgrade and get paged. Often the biggest cost, never on the invoice: compare .

  6. 6
    Unit 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).

04

Watch a decision being made

4 min
Worked example

Lina explains (and cuts) the €310k bill

Karim needs an explanation and a plan for the CFO by Thursday, without hurting reliability.

  1. 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.

  2. 2Give every euro an owner

    35% of spend has no tag. Enforce team, env and feature in 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.

  3. 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.

  4. 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.

The whole thing in one line: Lina turned the total into a cost per booking, found the lines growing faster than the business, gave every euro an owner, and removed waste before committing.
05

In real life

3 min
Rent or own?

Netflix: 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.

06

What goes wrong

3 min
Comparing only server prices

Egress, IOPS, NAT, logs and support can be half the bill.

Instead

Model every meter of a design, plus people time.

Committing to today's wasteful capacity

Three years of paying for a fleet at 22% CPU.

Instead

Tag, shrink and rightsize first; commit to the steady floor.

Watching the total instead of the unit cost

A growing bill can be healthy; a flat one can hide a shrinking business.

Instead

Track cost per booking monthly, next to latency and errors.

07

Trade-offs

3 min
PricingRelative priceFitsRisk
On-demand100%New or unpredictable workloads; peaksFull price for flexibility
Savings plan / reserved~40–80%Steady baseline for 1–3 yearsPaying for commitment if you shrink
Spot / preemptible~10–40%CI, batch, retryable workersTaken back with little notice
Wednesday, 16:00. The day before the CFO meeting.
  1. Karim · CTO
    Finance can sign a 3-year savings plan on all of today's compute tomorrow. 40% off, about €38k a month saved from day one.
  2. Lina · Senior engineer, your mentor
    Our fleet is at 22% CPU. Rightsize first, then commit to the smaller fleet.
  3. Karim · CTO
    Rightsizing takes six weeks. That's six weeks at full price.
08

Your job as tech lead

4 min

Claude 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.

Decisions you own
  • 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.
Tell Claude Code
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.
Check before you accept
  • 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.
Red flags
  • 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.
09

Check yourself

2 min
Q1/3Scenario
Last year: €6,000/month for 20,000 bookings. This year: €19,000/month for 60,000 bookings. By what percentage did cost per booking change? (Enter a positive number for an increase.)
%
How confident are you?

Next 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.

Finished?

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.
10

Technical deep dive

See, shrink, then commit

Pricing models for the same compute. The numbers are illustrative relative values; real discounts vary by provider, term and region.

ModelRelative priceCommitmentRiskFits
On-demand100%NoneYou pay full price for flexibilityNew or unpredictable workloads; the peak above your baseline
Savings plan~60–80%€/hour of spend for 1–3 yearsPaying for unused commitment if you shrinkSteady baseline that may change instance types
Reserved capacity~40–70%A specific resource for 1–3 yearsLocked to a size or region you may outgrowDatabases and other stable, long-lived resources
Spot / preemptible~10–40%NoneTaken back with little noticeCI runners, batch jobs, stateless workers that can retry
ServerlessPer request / per msNoneExpensive at steady high volumeSpiky or low-volume workloads; scale to zero
Commit to the floor of your usage, not the peak. Pay for flexibility only above it.
Worked example

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.

  1. 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.

  2. 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.

  3. 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.

  4. 4Give every euro an owner

    35% of spend has no tag. Enforce team, env and feature tags in the infrastructure code, and alert on untagged spend.

    sql
    SELECT 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.

  5. 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.

  6. 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.

The whole thing in one line: Lina turned the total into a cost per booking, found the three lines growing faster than the business, gave every euro an owner, and removed waste before committing: about €0.10 per booking back toward €0.08.
11

Interactive simulation

12

Visual diagram

Click a component

Where the money goes in a hotel booking SaaS (illustrative €19k/month). Click a component for its meter.

13

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.

14

Check your understanding

Q1/3Reasoning
A team estimates their new design at '6 instances × €150 = €900/month'. Which costs is that estimate most likely missing? (Select all that apply.)

Select all that apply.

How confident are you?
15

Practice ladder

Step 1 · Trace

Trace the meters of one feature

Estimation Warm-up

Maya'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.

Step 2 · Complete

Finish Lina's cost note for the CFO

Decision Practice

Lina's note for Thursday has two gaps. Fill in steps 3 and 5.

  1. Unit cost: €0.08 per booking last year, €0.10 now.
  2. By meter: compute €95k, databases €80k, logs €52k, egress + NAT €45k, CDN + storage €26k, misc €12k.
  3. What grew faster than bookings (+71%): ___
  4. Owners: enforce tags; 35% of spend is untagged today.
  5. Plan, in order: ___
  6. Business decision: the Virginia replica costs a lot of egress but protects us if Frankfurt fails. Karim decides.
Step 3 · Solve

The photo pipeline bill

Estimation Practice

Hotels 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.

Step 4 · Decide

Self-host the search cluster?

Decision Stretch

The 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.

16

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.

0 words