Skip to content
Back to Architecture Decisions

Managed vs Self-Hosted

Choose between a cloud-managed service and self-hosting the open-source equivalent, based on ops capacity and cost.

Why

Managed services (RDS, MSK, ElastiCache) cost 2-3x the raw compute but eliminate 80% of the ops work — patching, backups, failover, upgrades. Self-hosting saves on the invoice but requires on-call expertise for that specific technology, which is the hidden cost that kills the savings. The right choice depends on your team's existing expertise and ops capacity: a team that already runs Postgres in production should self-host a second cluster, but a team that's never run Kafka should take MSK. The decision flips as you scale — self-hosting becomes economic at large scale where the ops cost amortizes, but managed wins early when ops capacity is scarce.

When

When adding any infrastructure component. Takes half a day. Revisit at 10x scale (self-hosting may become economic).

How

1. Is the team already operating this technology? 
   - Yes → self-hosting is cheap (expertise exists)
   - No → managed is cheap (no new on-call burden)
2. Is a mature managed option available with the features we need?
   - No → self-host (forced)
   - Yes → continue
3. Compute TCO of both over 3 years (see tco-analysis — include ops!)
4. Assess the ops gap: what expertise would we need to acquire to self-host?
   - If > 1 FTE-equivalent to acquire → managed wins
5. Assess scale: at what scale does self-hosting become cheaper? Are we there?
6. Decide; if managed, note the exit path (how to migrate to self-hosted if needed)
7. If self-hosted, budget the ops time explicitly — it's not free

Example

Component: Kafka (event streaming)

Team expertise: never run Kafka → high ops gap
Managed (MSK): $1,200/mo, 0.5 eng × 10% ops = $640/mo → $1,840/mo
Self-hosted: $400/mo compute, 2 eng × 20% ops = $5,120/mo → $5,520/mo
  (and we'd need to hire/train Kafka expertise first)

Decision: MANAGED (MSK) — saves $3,680/mo and 6 months of expertise-building.
Revisit at 10x: if Kafka spend > $12k/mo, self-hosting may win (ops amortizes).

Common Problems

  • ⚠Self-hosting to save invoice cost without counting ops cost — the invoice drops $800/mo and you add $5k/mo of engineering time you didn't budget.

Best Practices

  • ✓Start managed, revisit at scale — the ops cost of self-hosting is front-loaded (learning) while the savings are back-loaded (scale); managed wins early.
  • ✓If self-hosting, still use managed for the hardest ops sub-problems (backups, cert rotation) — partial self-hosting captures most savings with less risk.

Related Resources