You probably don't need a database per tenant
Most of the advice, tutorials, and packages you’ll see for multitenancy, push the idea that to implement it properly, you need to have a database per tenant. That’s simply not true, and it’s more often than not, a more costly and complex approach for something you can achieve with something much simpler.
So, naturally, to help illustrate this point, I’ve written a full explanation on the full data-isolation spectrum. Every approach is covered, as well as how they stack up against each other, and behavioural differences between PostgreSQL, MySQL/MariaDB and SQLite.
If I’m being honest, PostgreSQL and RLS (row-level-security) is almost always your best option.

Don't miss what's next. Subscribe to ollieread.com Newsletter:
Share this email: