Managed or self-hosted
A managed service looks four times dearer than running it yourself. Learn what the difference really buys, how to count the people, where the crossover is, and what stays your job either way.
The lesson in text
Click a paragraph to hear it.01Fifteen or sixty
Monday, a quarter past nine. StayHub's new connectivity team is ready to stream every change in free rooms, from 900,000 rooms, through a message system called Kafka.
Karim has a quote from a cloud provider that would run Kafka for you: €60,000 a month. And about €120,000 next year, when the volume doubles.
Omar, the on-call engineer, ran Kafka at his last job. "On our own machines, the same capacity costs about fifteen thousand. We'd save forty-five thousand a month." Karim has just one question: who's on call at 3 a.m. on a Sunday?
This is managed or self-hosted. In this lesson, you'll learn what that forty-five thousand really buys, how to count the people, and where the answer flips. Then you'll make the call.
02What's being decided
First, what Kafka does. Picture a long conveyor belt. Workers put every update on it: this room is now free, that one is sold. Everything that needs to know, like search and booking, takes the updates off the belt.
The belt also remembers. It keeps thirty days of updates, so a service that falls behind can catch up. That makes it stateful: it holds data. If it loses some, StayHub shows rooms that are gone, and sells them twice.
Now the two options. Managed: the provider runs Kafka on its machines, keeps it healthy, and you just use it. Self-hosted: you rent plain machines from the cloud, install Kafka yourself, and your team keeps it alive.
| Job | Managed | Self-hosted |
|---|---|---|
| The machines | Provider | You rent them, provider keeps the hardware |
| Installing Kafka, new versions, security fixes | Provider | Your team |
| A machine dies: move the work, lose nothing | Provider | Your team |
| Disks fill up: add space, spread the data | Provider | Your team |
| Watching it, on call at 3 a.m. | Provider | Your team |
| How you use it: topics, connections, access, capacity | You | You |
Notice this isn't build or buy. Nobody is writing their own Kafka: both options use the same free, open-source software. The only question is who runs it. And that turns out to be a question about people.
03Renting a car
Think of a car. Renting one looks expensive per day, compared with what the car itself costs. But the rental price includes insurance, servicing, repairs, and a replacement car when yours breaks down on the motorway.
Owning a fleet gets cheaper per kilometre, but only when two things are true. You drive a lot, every day. And you have mechanics you trust, ready at any hour.
Without the mechanics, the cheap car is the one stuck by the road at night. Omar's fifteen thousand is the price of the car. The question is: who are the mechanics?
04What the managed bill buys
So let's list what the provider does for that money. When a machine dies, it moves the work to another one, without losing updates. When disks fill up, it adds space and spreads the data again.
It installs new versions and security fixes, one machine at a time, without stopping the belt. It watches everything, all day. And when something breaks at 3 a.m., its experts are already awake.
Self-hosted, every one of those chores becomes your team's job. None of it shows up in the price of the machines. That's why the machines look four times cheaper.
- · CPUs, memory, disks, network
- · Failover when a machine dies
- · Adding disk and spreading data
- · Upgrades and security fixes, one machine at a time
- · Monitoring, all day
- · Experts on call at any hour
There's a trap on the managed side too. Compare with the price you'd really pay. Karim's sixty thousand already includes a discount for committing to a year of use. Against the list price, managed would look worse than it is.
05Count the people
Here's the step everyone skips. A system that must work day and night needs a rotation: one person on call each week, someone to cover holidays and illness, and everyone able to fix it alone. That's about four engineers who know Kafka.
At StayHub, an engineer with those skills costs about €12,000 a month, all in. Four of them: €48,000. And today, StayHub has exactly one: Omar.
Now compare like with like. Self-hosted today: fifteen thousand of machines plus forty-eight thousand of people, sixty-three thousand. Managed: sixty thousand. It's a tie. Omar's saving disappears once the mechanics are counted.
Next year is different. Volume doubles, so the managed bill doubles, to €120,000. The machines double too, to thirty thousand. But the team doesn't double: four and a half people, about fifty-four thousand. Self-hosted: eighty-four thousand.
That's a saving of thirty-six thousand a month. People don't grow with traffic; they come in steps. So there's a crossover: below it, managed wins; above it, self-hosting wins, if the team exists.
Then add the risk. If a self-run belt loses updates, rooms look free when they're sold, and guests arrive at overbooked hotels. Either put a price on that, or practise failures until the risk is small.
06Managed, and still down
Before you decide, one warning from last month. StayHub's payouts database is fully managed. Every program that talks to it opens connections, like phone lines into the database. A new set of workers went live and opened about two thousand. The plan allows one thousand at once.
Payout writes started failing. The workers retried, which opened even more connections. For forty-seven minutes, hotels' payouts couldn't be saved.
And the provider's status page stayed green. It was right: its database was healthy, and it enforced its limit exactly as promised. The outage was StayHub's own.
- 10:15New workers go live and open ~2,000 connections. The plan allows 1,000 at once.
- Payout writes fail. Retries open even more connections.
- 47 minHotels' payouts can't be saved until the workers are scaled down.
- FixA connection pool, a limit per service, an alert at 70% of the limit, a review before any new service connects.
Managed is shared responsibility, not no responsibility. The provider runs the machine. You still own how you use it: connections, data, access, capacity, and practising a restore. The fix was a connection pool, a limit per service, and an alert at seventy percent.
07The decision
Back to Kafka. Omar argues: next year we save thirty-six thousand a month, so let's self-host now and learn while volume is low. Karim answers: today it's a tie, we have one person who knows it, and every room update depends on it.
Both are partly right. The numbers favour self-hosting later. But the team doesn't exist yet, and learning on production data is learning with guests' bookings.
Real companies land on both sides. In 2022, 37signals, the makers of Basecamp, left the cloud for its own servers, and says it now saves close to two million dollars a year. But it had a large, steady bill, and the people to run its own machines.
So the decision: stay managed now, and hire first. Switch when the managed bill passes about €90,000 a month and a team of four with Kafka experience exists. Both conditions, not one. And run the numbers again every year.
- Today
- Stay managed. It's a tie on cost, and only one engineer (Omar) knows Kafka.
- Hire first
- Build a team of four with Kafka experience before moving anything.
- Switch when
- The managed bill passes about €90,000 a month AND that team exists. Both, not one.
- Re-check
- Run the numbers again every year, with the price we really pay (committed-use discount included).
- Small bills
- The €4,000-a-month connectivity database stays managed: a rotation would cost twelve times more.
The same maths settles smaller cases fast. The connectivity team's database costs €4,000 a month, managed. No rotation of four people costs less than that. It stays managed.
08Your job as lead
With Claude Code, setting up your own Kafka takes an afternoon. It can write every script to create the machines and install it. But the setup was never the cost. Running it for years is.
So when someone proposes to run a system yourselves, ask three questions. Who's on call at 3 a.m., and how many people really know it? What does it cost per month with the people counted in steps, today and at twice the volume?
And if it stays managed: what is still ours? Ask Claude Code to check connection limits and pool sizes for every new service, with an alert before the limit, not after. And ask when we last restored a backup. A backup nobody has restored is a hope, not a plan.
Let's recap. Managed sells you operations; self-hosting buys a lower price with your own people. Count those people in steps, find the crossover, and write down when you'd switch. Managed never means no responsibility. Next lesson: the last decision of the season, choosing between a cheaper AI model and a smarter one.
Check yourself
0/10 answered1What does "self-hosted" mean here?
2Omar says self-hosting costs €15,000 a month against €60,000 managed. What's missing from his number?
3In the car picture, what makes owning a fleet worth it?
4Why do you need about four engineers for a 24/7 rotation, and not "0.3 of an engineer"?
5Next year the volume doubles. Managed goes from €60k to €120k a month. Why does self-hosted only go from €63k to €84k?
6New workers opened 2,000 connections to the managed payouts database (limit 1,000). Payouts failed for 47 minutes; the provider's status page was green. Whose outage was it?
7Which fix matches that incident?
8Omar wants to self-host Kafka now, "to learn while volume is low". What's the decision in the lesson?
9Claude Code writes, in an afternoon, every script to run your own database. What's the most important thing to ask next?
10A managed database costs €4,000 a month. Should StayHub self-host it to save money?
Save your progress — create a free account
Free. No card. Your finished lessons follow you to any device, and you can ask questions in the community.
Create my free accountEvery lesson is free while we build. Lock in €9/month for later.
The first 100 members keep the founding price for as long as they stay. Reserving is free: no card, nothing is charged.
See the founding offer