Skip to content
Vertex Stack
Menu

Two build engagements per year

DevOps · 6 min read

Self-hosting vs managed services in 2026: a cost breakdown

Self-hosting Postgres and Redis on a cheap VPS looks like a great deal until the first 3am page. Here's an illustrative cost model at three scales — and the point where the managed premium starts paying for itself.

By Adil Mir · · Updated

The pitch for self-hosting is seductive: spin up a $20 VPS, install Postgres and Redis, save 80% on infrastructure. The pitch is also partially true — at small scale, a competent team running a few Docker containers on Hetzner really does pay a fraction of what AWS would charge. What the pitch leaves out is the on-call rotation, the 3am page when disk fills up, and the quiet cost of engineering hours that could have shipped features. This piece walks through illustrative numbers at 10k, 100k, and 1M users across the five services that dominate a SaaS infrastructure bill — Postgres, Redis, queues, search, and observability — and where the break-even point sits for each.

The services that actually matter

Most SaaS infrastructure bills are dominated by a handful of line items. Everything else is rounding error until the business hits serious scale. The five that matter, in rough order of spend:

  • Postgres — the primary database. Almost always the single largest line item.
  • Redis — cache, session store, rate limiter, pub/sub. Cheap until it isn't.
  • Background job queues — BullMQ on Redis, Inngest, Trigger, or SQS.
  • Search — Postgres full-text, Meilisearch, Typesense, Algolia, or Elastic.
  • Observability — logs, metrics, traces. The silent budget killer.

Postgres — where the gap is widest

Postgres is where the self-hosting savings look most dramatic on paper. A Hetzner dedicated box with 64GB of RAM, 8 cores, and dual NVMe SSDs costs well under 100 EUR per month. The equivalent compute on AWS RDS can easily run past $800 once you factor in storage, IOPS, and a multi-AZ standby. That is an order-of-magnitude gap on raw compute, and it is not going away.

The catch is that managed Postgres bundles things a bare VPS does not. Point-in-time recovery, automated failover, minor-version patching, encrypted backups to object storage, read replicas behind a single endpoint, and a pager that wakes somebody other than the founding engineer. Each of those is solvable with open-source tooling — pgBackRest, Patroni, repmgr — but each solution is a weekend to set up, a quarter to harden, and an ongoing maintenance obligation.

Cost comparison at three scales

These are rough estimates built from public pricing pages in early 2026, meant for illustration. Round generously — vendor pricing changes often and actual workloads vary.

Service10k users (managed)10k users (self)100k users (managed)100k users (self)1M users (managed)1M users (self)
Postgres$80 (RDS t3.medium)$20 (VPS share)$450 (RDS m5.xlarge + replica)$120 (dedicated)$2,400 (RDS + replicas)$600 (dedicated cluster)
Redis$15 (Upstash Pro)$5 (VPS share)$90 (Upstash Pay-as-go)$30 (small VPS)$600 (Redis Cloud HA)$200 (HA pair)
Job queue$25 (Inngest starter)$0 (BullMQ on Redis)$200 (Inngest scale)$0 (BullMQ)$1,200 (Inngest/Trigger)$50 (dedicated workers)
Search$30 (Algolia starter)$0 (Postgres FTS)$300 (Algolia growth)$40 (Meilisearch VPS)$2,000 (Algolia scale)$300 (Typesense cluster)
Observability$50 (Better Stack)$10 (Grafana Cloud free)$400 (Datadog starter)$60 (self-hosted LGTM)$3,500 (Datadog)$400 (self-hosted)
Monthly total~$200~$35~$1,440~$250~$9,700~$1,550

In this model the ratio sits around 6x at every scale. The gap is widest for observability, where vendor pricing has stayed punishing while open-source alternatives matured considerably through 2025. The gap is narrowest for Redis at low volume, where Upstash's pay-per-request model can be cheaper than a dedicated idle VPS until traffic gets serious.

The hidden costs of self-hosting

Those numbers are honest about infrastructure but dishonest about total cost. Self-hosting comes with a bill the invoice never shows.

  • Setup time. A production-ready Postgres with replication, backups, and monitoring is 16 to 40 engineering hours the first time. Call that $4,000 at a senior rate.
  • Ongoing ops. Security patches, minor version upgrades, disk expansion, certificate rotation. Budget 2 to 4 hours per month per service — so up to 20 hours across the stack.
  • Incidents. The disk fills at 2am. The replica falls behind during a schema migration. The Redis node OOMs under a traffic spike. Self-hosted teams eat these; managed teams pay someone else to.
  • Opportunity cost. Every hour debugging pg_dump is an hour not shipping the feature that closes the next deal. At an early-stage company this is the bill that matters most.
  • Knowledge concentration. When the one engineer who set up Patroni leaves, the knowledge leaves with them. Managed services insulate teams from bus-factor risk.

When self-hosting actually pays off

Self-hosting starts making real sense in a few specific situations. Outside these, the managed premium is usually worth paying.

  1. Monthly infra bill crosses $2,000 to $3,000. Below that, the engineering hours cost more than the savings. Above that, a part-time platform engineer pays for themselves.
  2. Data residency or compliance forces self-hosting. Some regulated markets will not let data leave a specific provider or region. The decision is made for the team.
  3. The workload is unusual enough that managed pricing punishes it. High-churn Redis keyspaces, massive write volume on Postgres, bursty queue workloads — all patterns where metered managed pricing breaks down.
  4. There is already an experienced platform engineer on the team. If they have run Postgres in production before, the ops cost drops sharply.
  5. The product is infrastructure-adjacent. If selling to developers or running a database-heavy tool, owning the stack is both cheaper and better for the product.

A decision framework that actually works

Instead of a blanket policy, teams get better outcomes by answering four questions per service.

  1. What happens if this service is down for an hour? If the answer is 'revenue stops', the managed SLA is probably worth it.
  2. Who on the team has run this in production before? Zero answer, stay managed.
  3. What is the managed bill at projected 12-month scale? If under $500, the self-host conversation is not worth having yet.
  4. Is this service differentiating or commodity? Differentiating workloads (the AI pipeline, the matching engine) deserve owned infrastructure. Commodity workloads (sending emails) do not.

What I recommend for new projects

My default stack for a new SaaS project in 2026 is a blend rather than a pure side. Managed Postgres from Neon or Supabase for the primary database, because recoverability matters more than cost at pre-revenue stages. Self-hosted Redis and BullMQ on the same VPS as the app, because Redis is trivial to run until traffic gets serious. Meilisearch self-hosted if search is needed, because Algolia pricing hurts fast. Grafana Cloud's free tier for observability, with Datadog introduced only once the customer base justifies the spend. Using the estimates above, the resulting bill at 10k users lands around $80 to $120 per month — more than the pure self-hosted number, well below the pure managed one, and without most of the 3am pages.

Key takeaways

  • The managed-vs-self gap is real — around 6x on pure infrastructure in the estimates above — but it closes dramatically once engineering hours enter the calculation.
  • Self-hosting below $500 per month in managed spend is usually a loss. The engineering time costs more than the savings.
  • Postgres is the highest-stakes service to self-host. Get recoverability and failover right or stay managed until the bill forces the move.
  • Observability is where managed pricing hurts most at scale. Self-hosted Grafana or Better Stack's free tier can save thousands a month once traffic is serious.
  • A hybrid stack — managed Postgres, self-hosted everything else — is the honest sweet spot for most SaaS products between 10k and 100k users.

DevOps · 7 min read

Deploying Node.js at scale: PM2 vs Kubernetes vs Fly.io vs Vercel

Most teams pick the wrong deployment target for their stage. Here's a stage-by-stage breakdown of PM2 on a single VPS, Fly.io, Vercel, and Kubernetes — with indicative cost ranges, ops tradeoffs, and the failure modes nobody warns you about.

Backend · 7 min read

MongoDB vs PostgreSQL for SaaS: a 2026 decision framework

The database-choice argument has calmed down since 2020. PostgreSQL covers more workloads than MongoDB ever did, and MongoDB still wins in specific, well-defined cases. Here is the 2026 decision framework — when each one earns its slot, and the scaling myth that still sends teams down the wrong path.