NeonN
Neon2y ago
7 replies
colossal-harlequin

Best way for Schema/Database per tenant?

Hello, my SaaS project will require a separate database (or schema) for each tenant. (Each trial registration would create a new database). From what I've read it looks like Neon should be able to support this model. But I am not completely sure it is a good idea.

I am wondering, at what level should I separate my tenants by?

A project per tenant?
A branch per tenant?
A database per tenant all within a single branch in a single project?
Or a database per tenant within multiple branches in multiple projects?

I understand that Computes are each mapped to a branch in a project.
So having multiple branches can help with distributing load.

How easy is it though to move a database to a different branch or different project in case I need to move some high use tenants out of a branch?

Or is all of this a bad idea?
Was this page helpful?