Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 7 min read Opinion mediumAdept

Database-per-User Architecture With Isolated Application Environments

Deploying a full copy of the application and its own Neon Postgres project per customer is justified mainly by data residency requirements and by letting customers control upgrade timing, not by per-customer customization, which turns each deployment into a separate product. Complexity moves from runtime routing into provisioning, a central control plane and catalog database that track feature enablement and deployed versions, and per-customer networking such as subdomains or custom URLs. The hardest part is versioning: when fixes are backported across release series, upgrades should be linearized through each minor series, and schema migrations should be idempotent (checking for existing columns and constraints) so backported changes don't conflict with later upgrades.

Related posts

  • Database-per-User Architecture With Shared Application Environments: How and Why

    Neon mediumAdept

    A single shared application environment serving many per-customer Neon Postgres databases keeps deployment simple, but every tenant database must stay at the same schema version and data residency is hard to offer. Tenant identification can come from a login field, a per-customer subdomain, or a lookup from the user's credentials. A catalog database maps users or JWT-carried customer IDs to Neon project IDs for connection routing, and it also holds tier and feature-flag context. Schema changes need either slow, backward-compatible rollouts using views and triggers, or pre-upgrade testing of each tenant database on branches. The control plane should be kept separate from the app so failures don't take both down.

  • Control Planes for Database-Per-User in Neon

    Neon mediumAdept

    A database-per-user architecture on Neon usually means one Neon project per customer, and that quickly needs a control plane to manage onboarding, monitoring and schema upgrades across many projects. The core piece is a catalog database: a separate Neon project holding an account manifest, per-project metadata such as deployed schema version, and billing data. It should use foreign keys, citext/uuid/timestamptz types and indexes. The practical advice is to start with the Neon console, neonctl and runbooks, automate the most time-consuming tasks first, and treat the control plane as an internal product. Tracking each database's migration version through tools like sqitch or Flyway is critical for rolling out upgrades safely.

  • Multi-tenancy and Database-per-User Design in Postgres

    Neon easyNovice

    Postgres multi-tenancy comes in three main designs: shared schema, schema-per-user and database-per-user. Shared schema is cheapest but raises the risk and impact of isolation failures. Schema-per-user adds operational burden without strong isolation and is rarely worth it today. Database-per-user gives full isolation, data residency control and a fix for noisy neighbors, and it can pair with either isolated or shared application environments, each with tradeoffs in onboarding, versioning and complexity. Running it at scale requires a control plane to automate onboarding, monitoring and schema upgrades across the database fleet.

  • One Postgres, a database per user, or both?

    Turso easyNovice

    Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users. Early-stage web apps default to a single Supabase Postgres with row-level security and a self-hosting exit. Local-first apps like Sample Vault give each user a Turso database synced to their machine, which provides isolation by construction and data ownership if the product disappears. Hybrid apps use Supabase to govern accounts, auth and storage while per-user Turso databases hold user data. Because database-per-user is "a bet against cross-user features", teams should list every cross-user read before adopting it; the agent delegation case shows the cost, since delegated tasks must be copied into a central database.

  • Promoting Postgres Changes Safely From Multiple Environments to Production

    Neon mediumAdept

    A snapshot-based workflow for promoting Postgres schema and data changes uses two isolated root branches, prod and dev, linked only through Neon snapshots. Features and previews live on short-lived child branches, and validated changes are applied back to dev with migrations. Promotion means snapshotting prod for rollback and then restoring a dev snapshot onto prod. Endpoints stay the same and connections drop only for milliseconds, but any prod writes made after the snapshot are lost, so production must be read-only or reconciled at the application level. Rollback and dev refresh use the same restore operation, and costs stay manageable through logical-size billing, snapshot retention policies and branch TTLs.

The quest for software engineering knowledge.

Look:
Layout: