Skip to content

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

Neon 12 min read How-to mediumAdept

Control Planes for Database-Per-User in Neon

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.

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.

  • Database-per-User Architecture With Isolated Application Environments

    Neon mediumAdept

    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.

  • 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.

  • Migrating Schemas Across Many Neon Projects Using DrizzleORM

    Neon mediumAdept

    Database-per-tenant setups need every tenant database kept on the same schema, and this walkthrough automates that across many Neon projects with DrizzleORM, the Neon API and GitHub Actions. A create script provisions a Neon project per customer. A generate script lists all projects, writes a per-tenant drizzle.config.ts, runs drizzle-kit generate, stores each connection string as an encrypted GitHub secret, and rewrites the workflow YAML to expose those secrets. A migrate script, triggered when a PR is merged to main, runs drizzle-kit migrate against every config so schema changes reach all tenants.

  • How Cedalio uses Neon for an efficient development workflow

    Neon easyNovice

    Cedalio, an ESG data verification startup, moved from DynamoDB to Postgres and picked Neon over RDS for a simpler API and console. GitHub Actions creates a Neon database branch and a Fly.io app instance for each PR, then deletes both after merge, and scale-to-zero keeps these temporary environments cheap. A one-database-per-customer design gives tenant isolation. Their backend reads the Postgres WAL, bundles and encrypts operations, stores them optionally on IPFS or Arweave, and commits a hash to a client-owned smart contract for tamper-evident auditing.

The quest for software engineering knowledge.

Look:
Layout: