← Return to Blog / Thoughts

The Transition to Serverless Data Architecture

2026-03-106 min
DatabaseInfrastructurePostgreSQLArchitecture

I ran a self-hosted Postgres cluster on OpenStack for two years. Then I moved the same workload to a managed service. This post is an honest accounting of what changed — the good and the bad.

What You Give Up Running It Yourself

Self-hosting gives you control, but control is a liability masquerading as an asset. Every tuning decision, every WAL configuration, every failover test is time you're not spending on the product. Our DBA runbook was 40 pages long and only one person had actually read all of it.

The cost of expertise compounds. When the primary went down at 2am on a Saturday, someone had to know what pg_ctl promote does and when to run it.

What You Actually Get from Managed Services

Neon gave us:

  • Branching — spin up a full copy of the database for a PR in under 30 seconds
  • Automatic point-in-time recovery with a simple API call
  • Scale-to-zero during off-hours (real savings on non-critical environments)
  • Connection pooling via PgBouncer baked in

The branching feature alone changed how we do development. Before, dev environments shared a staging database because spinning up a fresh Postgres with a full dataset was too slow. Now it's a single CLI command.

The Migration

We ran both systems in parallel for three weeks using logical replication:

-- On the source (self-hosted)
CREATE PUBLICATION migration_pub FOR ALL TABLES;

-- On the target (Neon)
CREATE SUBSCRIPTION migration_sub
  CONNECTION 'host=old-primary ...'
  PUBLICATION migration_pub;

Logical replication gave us a live feed of changes. The final cutover was a matter of updating the connection string in the Nuxt runtime config and flipping DNS — 4 seconds of write downtime, confirmed by our uptime monitor.

Where Self-Hosting Still Wins

If you have regulatory requirements that prohibit data leaving a specific jurisdiction, managed services often can't help. Likewise, if your data access patterns are unusual enough that you need to tune kernel parameters or run custom Postgres extensions not available in managed offerings, self-hosting remains necessary.

But for most product workloads? The managed path recovers 6–10 hours of engineering time per month and eliminates a class of 2am incidents entirely. That's the real calculation.