A B2B services company with about forty employees recently launched a new internal tool, powered by Supabase, to manage client projects. Its success was immediate, adoption rapid, and soon the idea of transforming this 'internal tool' into a full-fledged multi-tenant SaaS began to take root. The classic dilemma emerged: how to ensure one client's data is completely isolated from another's, while maintaining performance and manageability? This isn't just a technical question, but a strategic choice impacting development costs, security, and future scalability.
At Logika.studio, when designing multi-tenant architectures on platforms like Supabase (which provides an excellent PostgreSQL foundation with built-in authentication and real-time capabilities), we primarily observe three recurring patterns. The choice is never straightforward; often, the 'best' option is the one that aligns with current business needs while accommodating a future growth path. Ignoring these trade-offs can lead to costly re-engineering.
RLS-only: Simplicity for Getting Started

The most straightforward pattern, and often the first that comes to mind, relies solely on PostgreSQL's Row Level Security (RLS). Supabase, with its native integration and support for Drizzle or other modern ORMs, makes implementation relatively simple. Each data row in the database is associated with a tenant_id, and RLS policies ensure that a user can only view and modify rows belonging to their specific tenant.
Advantages:
- Cost-Effectiveness: Lower infrastructure overhead, as all data resides within the same database and tables. This maximizes the use of a single Supabase plan, potentially starting with the free or 'Pro' tier at $25/month, then scaling up.
- Initial Development Simplicity: Rapid implementation for MVPs and early tenants. Next.js 15, Vercel, and Clerk for authentication integrate seamlessly.
- Unified Management: Backups, monitoring, and updates apply to a single instance.
Disadvantages:
- Performance at Scale: With thousands of tenants and millions of rows, RLS policies can introduce significant overhead on every query, slowing down performance. Each query must evaluate security conditions.
- Policy Complexity: Managing complex RLS policies, especially when introducing different user roles within a tenant, can become a debugging and maintenance nightmare.
- Weak Logical Isolation: While robust for security if configured correctly, the isolation is only logical. All data physically resides in the same container. This can be a limitation for certain compliance requirements. As we discussed in an article on AI security, data protection is multifactorial.
When to use it: Ideal for early-stage startups, internal tools, or SaaS products with a limited number of tenants (<100) and less stringent compliance requirements.
Schema-per-tenant: Balancing Isolation and Manageability

An evolution from pure RLS is the schema-per-tenant approach. In this pattern, each client (tenant) has its own schema within the same PostgreSQL database. Each schema contains tables relevant only to that tenant (e.g., tenant_a.users, tenant_a.projects). The application, upon connection or during a session, changes PostgreSQL's search_path to point to the current tenant's schema.
Advantages:
- Strong Logical Isolation: Each tenant's data is separated into distinct schemas, offering a higher level of isolation compared to RLS. This simplifies granular backups and restores.
- Improved Performance: Without the constant RLS evaluations on every query, performance can be better at intermediate scales.
- Facilitated Migrations: Ability to perform database migrations specific to a single tenant, if necessary.
- Cost-Effective Scalability: Still uses a single database but with better segmentation. A Supabase 'Business' plan (around $250/month) might be suitable to support more connections and CPU resources.
Disadvantages:
- Operational Complexity: Managing schemas (creation, migration, updating) requires automation and careful attention. Connection and connection pooling management become crucial to avoid performance issues.
- Higher Initial Development Cost: Requires more effort to set up the schema management infrastructure and adapt the application to handle the
search_path. - Connection Limits: Although less stringent than RLS, a single database has limits on the number of concurrent connections, which can become a bottleneck with many active tenants.
When to use it: Growing SaaS products with hundreds or thousands of tenants that require more robust isolation and migration flexibility, but aren't yet ready for the overhead of a dedicated database per client.
DB-per-tenant: Ultimate Isolation
The most radical and costly approach is to dedicate an entire database (and thus a single Supabase instance) to each tenant. Every client has its completely separate data infrastructure.
Advantages:
- Maximum Isolation and Security: No risk of 'noisy neighbors'. Each tenant has its dedicated resources, essential for very stringent compliance requirements (e.g., HIPAA, GDPR in specific contexts) or for enterprise clients demanding their own infrastructure.
- Dedicated Performance: Each client benefits from the full resources of their own database, without contention.
- Scalability Flexibility: A single database can be vertically scaled for a high-traffic client without affecting others.
- Independent Backups and Restores: Extremely easy to manage specific operations for each tenant.
Disadvantages:
- High Infrastructure Cost: Multiplies the database cost by the number of tenants. Even with Supabase 'Pro' plans at $25/month, 100 tenants already mean $2500/month just for databases, plus orchestration costs.
- Management and Deployment Complexity: Managing hundreds or thousands of separate database instances is a massive undertaking. Deployment, monitoring, updates, and patching require sophisticated automation and dedicated teams. This is where the benefit of platforms like Supabase (which manage infrastructure) clashes with the user's multiplication of instances.
- Development Time: Requires significant investment in automation for provisioning and managing new databases.
When to use it: Large enterprises, highly regulated sectors, or clients with specific performance and isolation needs that justify the high cost and operational complexity. Rarely the first choice for a startup.
Choosing a multi-tenant pattern is a key architectural decision. At Logika.studio, we've observed that RLS is often an excellent starting point for validating a product, later evolving towards a schema-per-tenant approach as the business grows and isolation requirements become more stringent. DB-per-tenant remains an option for very specific, high-value use cases where managing complexity is justified by the benefits. The key is to design with scalability in mind, understanding that a transition between these patterns is possible, but requires careful planning.
If multi-tenant isolation complexity concerns you or you're considering migrating your SaaS, our free 30-minute audit is available at Logika.studio/audit — quick analysis, 2-3 concrete points, zero pitch.



