Skip to content
Episode 147 · Fifteen thousand on VMs, sixty thousand managed

Managed vs self-hosted: who carries the pager?

Monday, 9:15. The new connectivity team will push availability for 900,000 rooms through Kafka. The managed quote is 60,000 € a month, doubling next year. Omar ran Kafka at his last job: "On VMs it's 15,000."

Pay a provider to run your database, or run it yourself? The real question is who gets woken up at 3 a.m.

30 min advancedManaged services vs self-hostingOperational people cost (toil, on-call, upgrades)Managed vs self-hosted cost crossoverShared responsibility modelTotal cost of ownershipData residency & GDPR constraints
  1. Problem

    StayHub's managed Kafka, which carries availability events from ~900,000 rooms, costs ~€60,000 a month and will double next year. Running it yourself on virtual machines looks four times cheaper. The same question applies to its databases and containers: rent each as a managed service, or run it yourself?

  2. Why the simple system fails

    Comparing the managed invoice with raw VM prices makes self-hosting look several times cheaper, and ignores backups nobody tested, upgrades nobody did, and the engineer woken at 3 a.m.

  3. Engineering concept

    Managed services sell operations: people time, tested reliability and compliance paperwork, for a premium per unit. Self-hosting buys control and lower unit cost with your own people.

  4. Technology

    Managed PostgreSQL / Kafka / Kubernetes, Kubernetes operators as a middle ground, the shared responsibility model, and a TCO crossover calculation.

  5. Trade-offs

    Managed wins while people cost dominates; self-hosting wins at large, steady scale or when control and residency rules demand it. The crossover moves with your team and your bill.

01

The problem

2 min
Monday, 9:15. The connectivity team will stream availability for ~900,000 rooms through Kafka.
  1. Karim · CTO
    Managed Kafka quote: 60,000 € a month. About 120,000 next year when volume doubles.
  2. Omar · On-call SRE
    I ran Kafka at my last job. On VMs it's ~15,000 €. We'd save 45k a month.
  3. Lina · Senior engineer, your mentor
    You lead. What is that 45,000 € actually paying for?
02

The big idea

4 min
What the managed invoice is paying for
The big idea

Managed sells operations; self-hosting buys unit cost with your own people. Count the people, in steps.

Renting a car includes insurance, servicing and a replacement when it breaks. Owning gets cheaper once you drive a lot and have a mechanic you trust.

03

How it works

5 min

With a , the provider runs the software: failover, patches, backups, monitoring. The split says what still stays yours.

Comparing like with like
  1. 1
    List the chores

    Broker failover, disk growth, rebalancing, upgrades, security patches, monitoring, 24/7 on-call, restore drills.

  2. 2
    Count people in steps

    A real 24/7 rotation needs ~4 engineers who know Kafka: ~48,000 €/month. "0.3 FTE" doesn't exist for a critical system. We have one (Omar).

  3. 3
    Compare totals

    Now: 15k + 48k = 63k vs 60k managed. Next year: 30k + 54k = 84k vs 120k.

  4. 4
    Find the crossover

    The is the bill where self-hosting gets cheaper. Managed grows with volume; people grow in steps.

  5. 5
    Write the trigger

    Record where the crossover is and the condition that makes us move. Middle ground: a automates much of an expert's runbook.

04

Watch a decision being made

4 min
Worked example

You find the Kafka crossover (Lina checks)

Recommend what to do now and when to revisit, with numbers Omar and Karim can both check.

  1. 1List what managed does for us

    Failover, rebalancing, upgrades, patches, monitoring, specialist on-call.

    Why: Lina: "Add restore and replay drills; people forget those."

  2. 2Compute the crossover

    Saving = managed − (25% of managed + people):

    python
    monthly_saving(60_000, 0.25, 4)     # -3,000  break-even
    monthly_saving(120_000, 0.25, 4.5)  # +36,000
    crossover = (4 * 12_000) / (1 - 0.25)  # ≈ 64,000 €/month

    Why: People dominate the self-hosted side, so they decide when moving makes sense.

  3. 3Use the price we actually pay

    The 60k quote already includes our committed-use discount.

    Why: Comparing with list price inflates the saving.

  4. 4Decide with a trigger

    Stay managed now. Self-host when the bill passes ~90,000 €/month and a 4-person streaming team exists. Re-run yearly.

    Why: The margin above 64k pays for migration risk; without the team, the 48k in the formula is fiction.

The whole thing in one line: Break-even today, ~36k €/month saved at next year's volume, and a trigger tied to both the bill and the team.
05

In real life

3 min
Two well-known choices at scale

37signals: left the cloud

  • Publicly described moving apps onto its own hardware, citing large savings
  • Steady workloads; an experienced ops team

Fits steady load with an ops team in place.

Shopify: moved onto a cloud

  • Publicly announced moving its infrastructure to Google Cloud
  • Spiky traffic (Black Friday) benefits from elastic capacity

Fits spiky scale where focus matters more.

06

What goes wrong

3 min
Comparing the managed invoice with raw VM prices

VMs exclude backups, failover, patching and the people.

Instead

Infra + people in steps + risk vs the discounted managed price.

Self-hosting to learn, in production

Production data shouldn't be the curriculum.

Instead

Learn in staging; self-host only with skills and a rotation.

Never revisiting the decision

Managed is right at 2k €/month and can be very wrong at 200k.

Instead

A trigger on bill and team size; re-run yearly.

07

Trade-offs

3 min
OptionFits whenCosts
Fully managedSmall or medium bills, no deep skillsPremium grows with volume
Operator on managed KubernetesYou run Kubernetes well; big premiumTwo layers to operate; 24/7 skills
Self-hostedLarge steady bills past the crossover, a teamBackups, failover, on-call all yours
Thursday, 14:00. Agreeing the Kafka ADR.
  1. Omar · On-call SRE
    Self-host now, while volume is low, and the team is ready when it matters.
  2. Karim · CTO
    It's break-even and we have one Kafka person. If it breaks at 3 a.m., that's overbookings.
  3. Karim · CTO
    Hire first. Migrate when the team exists.
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 comparison you trust: infrastructure (~25%) plus a real 4-person rotation, against the price you pay.
  • When to move, and who carries the pager (one Kafka engineer today).
  • What stays managed regardless, and what you still own on managed services.
Tell Claude Code
Prepare, don't migrate. Read `infra/kafka/` and write `docs/kafka-self-hosting-eval.md`: every task the provider does today; broker and disk sizing for today's and 2× volume, with the arithmetic; infrastructure at ~25% of the managed bill; people as a 24/7 rotation of 4 engineers at 12,000 EUR a month each. Mark every assumption; list what we must rehearse in staging first. Create or change no infrastructure.
Check before you accept
  • The people line is a full rotation, not a fraction of one person.
  • Crossover by hand: ~−3k a month today, ~+36k next year.
  • Compared against the discounted price; nothing created in the cloud account.
Red flags
  • Self-hosting costed at VM prices with "ops: minimal".
  • A Helm chart and migration plan before the evaluation is read.
  • One expert on call permanently.
09

Check yourself

2 min
Q1/3Reasoning
Self-hosting a database would cost 60% of the managed bill in infrastructure, plus half an engineer (€6,000/month) to operate it. Above what managed monthly bill does self-hosting start to save money?
€/month
How confident are you?

Last episode: the concierge's model provider launches a cheaper model and a smarter one in the same week. Everyone has an opinion; you'll decide, with numbers.

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

Finding the crossover
Worked example

You find the Kafka crossover (Lina checks)

Omar wants to self-host Kafka (~15,000 €/month on VMs); the managed quote is ~60,000 €/month, ~120,000 next year. Recommend what to do now and when to revisit, with numbers both of them can check.

  1. 1List what managed does for us

    Broker failover, disk growth and rebalancing, upgrades, security patches, monitoring, 24/7 on-call by specialists.

    Why: You can only price what you've named. Lina: "Add restore and replay drills; people forget those."

  2. 2Count people in steps

    A 24/7 rotation for a stateful system: ~4 engineers who know Kafka, ~12,000 € each → ~48,000 €/month (~54,000 next year). StayHub has 1 today.

    Why: "0.3 FTE" doesn't exist for a critical system. Either a rotation exists or one person burns out.

  3. 3Compute the crossover

    Saving = M − (0.25 M + people). Now: 60k − 63k = −3k (break-even). Next year: 120k − 84k = +36k/month.

    python
    monthly_saving(60_000, 0.25, 4)     # -3,000
    monthly_saving(120_000, 0.25, 4.5)  # +36,000
    crossover = (4 * 12_000) / (1 - 0.25)  # M* ≈ 64,000 €/month

    Why: Seeing which input dominates (here, people) tells you what has to change before moving makes sense.

  4. 4Compare against the discounted price

    Use the committed-use price (already in the 60k quote), not the list price.

    Why: Comparing self-hosting with a list price inflates the saving.

  5. 5Add the risk and the middle ground

    Lost events mean wrong availability and overbookings: budget drills. Consider a Kubernetes operator for Kafka, which narrows the people gap but adds the cluster to operate.

    Why: A cheaper option with an untested recovery has an expected cost the spreadsheet hides.

  6. 6Decide with a trigger

    Stay managed now. Self-host when the bill exceeds ~90,000 €/month and a 4-person streaming team with Kafka experience exists. Re-run yearly.

    Why: The crossover moves with volume and team. A trigger turns "maybe later" into a date someone checks.

The whole thing in one line: You priced managed vs self-hosted Kafka with people counted as a real rotation, found break-even today and a ~36k €/month saving at next year's volume, and recorded a trigger tied to both the bill and the team.
ResponsibilitySelf-hosted on VMsOperator on managed KubernetesFully managed
Hardware, OS patchingYouProvider (nodes: you schedule upgrades)Provider
Install, minor upgradesYouOperator automates, you triggerProvider
Backups / replay + recoveryYou build and test itOperator configures; you testProvider; you still drill restores
FailoverYou build, test and run itOperator automatesProvider
Monitoring + on-call for the systemYou, 24/7You, 24/7Provider for the service; you for your usage
Schema/topics, connections, accessYouYouStill you
The shared responsibility model, made concrete. The last row never moves to the provider.
11

Interactive simulation

12

Visual diagram

Click a component

A small booking platform (6 engineers, a textbook case), three stateful dependencies, and where the line of responsibility sits for each. Follow the walkthrough.

13

Analogy

  • Where you liveServiced apartment: someone fixes the boilerHow you run softwareManaged service
  • Where you liveOwning a house: the leak is yoursHow you run softwareSelf-hosting
  • Where you liveYou still pick furniture and lock upHow you run softwareShared responsibility: your schema and access
  • Where you liveOne person moving for a yearHow you run softwareSmall team: managed usually wins
  • Where you liveBig family staying twenty yearsHow you run softwareLarge scale: self-hosting can win

Where the analogy breaks: you can't rent half a house. In software you can mix, running some systems managed and others yourself, and switch each one as your size changes.

14

Check your understanding

Q1/3Reasoning
With managed Kubernetes, the provider is responsible for keeping your worker nodes, ingress controller, certificates and autoscaler add-ons upgraded and working.
How confident are you?
15

Practice ladder

Step 1 · Trace

Run the crossover for three systems

Estimation Warm-up

Using saving = M − (s × M + people × 12,000), trace these:

SystemManaged bill MInfra ratio sPeople needed
Connectivity Postgres4,000 €0.50.5 (but a rotation needs ≥ 4 shared with others)
Search cluster25,000 €0.42 (already in the search team)
Kafka next year120,000 €0.254.5

For each, compute the monthly saving and say whether you'd self-host.

Step 2 · Complete

Who owns what?

Explain Practice

StayHub uses managed PostgreSQL for payouts. Fill in who owns each item: provider, StayHub, or both, and add one sentence on why for the ones marked StayHub or both.

  1. Replacing a failed disk
  2. Applying minor security patches
  3. Running automated backups
  4. Testing that a restore actually works
  5. Adding an index for a slow payout query
  6. Limiting how many connections each service opens
  7. Deciding who can read the payouts table
  8. Producing audit evidence for the provider's data centres
Step 3 · Solve

A residency rule changes the answer

Decision Practice

A large Swiss hotel group will only join StayHub if its guests' booking data stays in Switzerland. StayHub's managed Postgres provider has no Swiss region. The group would bring ~3% of revenue.

Options: (1) decline the group; (2) self-host Postgres in a Swiss data centre for that group's data; (3) find a provider with a managed Swiss offering for a separate database.

Apply the method and recommend.

Step 4 · Decide

Where should the concierge's vectors live?

Decision Stretch

The concierge retrieves hotel policies and FAQs with embeddings: ~2 million vectors today, ~20 queries per second at peak.

Options: - A: pgvector in the existing managed Postgres (extra ~600 €/month for a bigger instance). - B: a managed vector database (~2,500 €/month at this size). - C: self-host an open-source vector database on Kubernetes (~700 €/month infrastructure + operations).

Write a short decision: "We chose X over Y because…, accepting the risk of…", with a revisit trigger.

16

Explain it yourself

A teammate says: "Managed Postgres is three times the price of a VM. We're wasting money." How do you respond?

0 words