A deep dive into building a database-per-user SaaS architecture using a shared application environment, where a single app deployment serves all users but each user gets their own Neon (Postgres) database. Covers authentication strategies for routing users to the correct database, the role of a catalog database as the central routing authority, control plane design considerations, and safe schema upgrade strategies across many user databases. Highlights trade-offs like loss of per-user version control and geographic data residency challenges, while emphasizing operational simplicity for smaller teams.
Table of contents
DisclaimersGetting Into a Single App EnvironmentTalking to the Right DatabaseThe Control Plane and Catalog Database in a Shared Application EnvironmentUpgrading Everything at the Same TimeConclusion8 Impressions