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.
- 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?
- 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.
- 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.
- Technology
Managed PostgreSQL / Kafka / Kubernetes, Kubernetes operators as a middle ground, the shared responsibility model, and a TCO crossover calculation.
- 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.
The problem
2 min- Karim · CTOManaged Kafka quote: 60,000 € a month. About 120,000 next year when volume doubles.
- Omar · On-call SREI ran Kafka at my last job. On VMs it's ~15,000 €. We'd save 45k a month.
- Lina · Senior engineer, your mentorYou lead. What is that 45,000 € actually paying for?
The big idea
4 minManaged 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.
How it works
5 minWith a , the provider runs the software: failover, patches, backups, monitoring. The split says what still stays yours.
- 1List the chores
Broker failover, disk growth, rebalancing, upgrades, security patches, monitoring, 24/7 on-call, restore drills.
- 2Count 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).
- 3Compare totals
Now: 15k + 48k = 63k vs 60k managed. Next year: 30k + 54k = 84k vs 120k.
- 4Find the crossover
The is the bill where self-hosting gets cheaper. Managed grows with volume; people grow in steps.
- 5Write the trigger
Record where the crossover is and the condition that makes us move. Middle ground: a automates much of an expert's runbook.
Watch a decision being made
4 minYou find the Kafka crossover (Lina checks)
Recommend what to do now and when to revisit, with numbers Omar and Karim can both check.
- 1List what managed does for us
Failover, rebalancing, upgrades, patches, monitoring, specialist on-call.
Why: Lina: "Add restore and replay drills; people forget those."
- 2Compute the crossover
Saving = managed − (25% of managed + people):
pythonmonthly_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 €/monthWhy: People dominate the self-hosted side, so they decide when moving makes sense.
- 3Use the price we actually pay
The 60k quote already includes our committed-use discount.
Why: Comparing with list price inflates the saving.
- 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.
In real life
3 min37signals: 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.
What goes wrong
3 minVMs exclude backups, failover, patching and the people.
Infra + people in steps + risk vs the discounted managed price.
Production data shouldn't be the curriculum.
Learn in staging; self-host only with skills and a rotation.
Managed is right at 2k €/month and can be very wrong at 200k.
A trigger on bill and team size; re-run yearly.
Trade-offs
3 min| Option | Fits when | Costs |
|---|---|---|
| Fully managed | Small or medium bills, no deep skills | Premium grows with volume |
| Operator on managed Kubernetes | You run Kubernetes well; big premium | Two layers to operate; 24/7 skills |
| Self-hosted | Large steady bills past the crossover, a team | Backups, failover, on-call all yours |
- Omar · On-call SRESelf-host now, while volume is low, and the team is ready when it matters.
- Karim · CTOIt's break-even and we have one Kafka person. If it breaks at 3 a.m., that's overbookings.
- Karim · CTOHire first. Migrate when the team exists.
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 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.
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.
- 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.
- 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.
Check yourself
2 minLast 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.
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
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.
- 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."
- 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.
- 3Compute the crossover
Saving = M − (0.25 M + people). Now: 60k − 63k = −3k (break-even). Next year: 120k − 84k = +36k/month.
pythonmonthly_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 €/monthWhy: Seeing which input dominates (here, people) tells you what has to change before moving makes sense.
- 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.
- 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.
- 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.
| Responsibility | Self-hosted on VMs | Operator on managed Kubernetes | Fully managed |
|---|---|---|---|
| Hardware, OS patching | You | Provider (nodes: you schedule upgrades) | Provider |
| Install, minor upgrades | You | Operator automates, you trigger | Provider |
| Backups / replay + recovery | You build and test it | Operator configures; you test | Provider; you still drill restores |
| Failover | You build, test and run it | Operator automates | Provider |
| Monitoring + on-call for the system | You, 24/7 | You, 24/7 | Provider for the service; you for your usage |
| Schema/topics, connections, access | You | You | Still you |
Interactive simulation
Visual diagram
A small booking platform (6 engineers, a textbook case), three stateful dependencies, and where the line of responsibility sits for each. Follow the walkthrough.
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.
Check your understanding
Practice ladder
Run the crossover for three systems
Estimation Warm-upUsing saving = M − (s × M + people × 12,000), trace these:
| System | Managed bill M | Infra ratio s | People needed |
|---|---|---|---|
| Connectivity Postgres | 4,000 € | 0.5 | 0.5 (but a rotation needs ≥ 4 shared with others) |
| Search cluster | 25,000 € | 0.4 | 2 (already in the search team) |
| Kafka next year | 120,000 € | 0.25 | 4.5 |
For each, compute the monthly saving and say whether you'd self-host.
Who owns what?
Explain PracticeStayHub 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.
- Replacing a failed disk
- Applying minor security patches
- Running automated backups
- Testing that a restore actually works
- Adding an index for a slow payout query
- Limiting how many connections each service opens
- Deciding who can read the payouts table
- Producing audit evidence for the provider's data centres
A residency rule changes the answer
Decision PracticeA 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.
Where should the concierge's vectors live?
Decision StretchThe 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.
Explain it yourself
A teammate says: "Managed Postgres is three times the price of a VM. We're wasting money." How do you respond?