Multi-Tenant Architecture: Shared Schema vs Isolated Database, and When to Switch
The shared-schema-with-a-tenant-id approach that got you to your first hundred customers is not the same decision as your thousandth. Here is how we decide.
A hardcoded "admin" and "member" role gets you to your first enterprise deal. It does not survive contact with their security questionnaire.
The first enterprise customer that fills out a security questionnaire will ask a version of the same question: "can we define custom roles with granular permissions, and can we audit who has access to what?" A platform built with two hardcoded roles answers "not yet," and that answer has ended more enterprise deals than any pricing objection we have seen.
The atomic-permissions layer is the piece worth building even if you launch with only two customer-facing role presets. It costs little extra at build time and it is the difference between "we can add a custom role for you" being a two-week engineering project versus a config change during the sales call.
The same discipline that applies to tenant isolation applies here: permission checks belong in a single, tested authorization layer that every code path routes through, never scattered as ad hoc `if (user.role === "admin")` checks across the codebase. We have seen platforms with a dozen subtly different permission-check implementations across different features, each one a slightly different bug waiting to be found by a penetration tester.
More from the same category.
The shared-schema-with-a-tenant-id approach that got you to your first hundred customers is not the same decision as your thousandth. Here is how we decide.
Usage-based pricing sells well on a pricing page. The metering, reconciliation and dispute-handling behind it is where most implementations quietly fail.
"We will fix it later" is a real financial decision with a real interest rate. Here is how we actually quantify it for clients.
Thirty minutes with the people who would actually do the work — no discovery deck, no account manager.