Back to posts

Single Tenant vs Multi Tenant: Which Architecture Should You Choose for Your SaaS?

Compare Single Tenant and Multi Tenant in depth: costs, isolation, compliance, performance. Discover which model fits your scenario.

TS
Thiago Saraiva
8 min read

350f008e99f6cfe062526719e6c4f47a

You're building a SaaS and need to decide: will each customer have their own isolated instance, or will everyone share the same infrastructure? This architecture decision shapes costs, security, development speed, and scalability for years. You can't afford to get it wrong.

The Analogy That Works

Mental Model Single Tenant = owning a house. Your land, your rules, your plumbing bill. Neighbor's party? Not your problem. Roof leaks? Entirely your problem. Multi Tenant = apartment building. Shared elevator, shared boiler, shared pest control. Cheaper rent, but when 3B floods, 2B gets wet too. Hybrid = condo with a penthouse. Most residents share the building, but the top floor has its own entrance, gym, and generator, for a price.

Keep this picture in your head. Every tradeoff below maps back to it.

Single Tenant: Total Isolation

In Single Tenant, each customer gets:

  • Their own VPC/network
  • A dedicated database instance
  • An exclusive application server
  • Separate encryption keys

The advantage is clear: real isolation. One customer never affects another. Perfect for:

  • Healthcare (HIPAA): health data requires strict isolation
  • Financial (PCI-DSS): card processing with network segmentation
  • Government (FedRAMP): government contracts with security requirements
  • Enterprise with strict SLAs: 99.99%+ with contractual penalties

The cost is significant. For 100 customers, you manage 100 database instances, 100 deployments, 100 sets of infrastructure.

Multi Tenant: Efficiency at Scale

In Multi Tenant, a single instance serves all customers, with logical isolation:

The advantage: brutal cost savings. One deployment, one database, one set of pipes.

Market examples: Slack, Notion, Shopify, Salesforce, all multi-tenant.

War Story: Atlassian's Server Sunset

Atlassian sold Jira and Confluence as Server (single-tenant, customer-hosted) for nearly two decades. Great margins per deal, miserable ops: every customer on a different version, support engineers debugging snowflakes. In October 2020 they announced Server's end-of-life, stopped selling new licenses in February 2021, and ended support on February 15, 2024, pushing customers to Cloud (multi-tenant) or Data Center. The transition took roughly 3.5 years from announcement to cutoff and consumed entire migration teams plus visible customer churn. Lesson: picking the wrong model early doesn't just cost money. It costs a decade.

Slack went the opposite direction: started pure multi-tenant, then built Enterprise Grid when Fortune 500s demanded isolation shared infrastructure couldn't deliver. Same story, different direction: the market eventually forces you to offer both.

Data Isolation Models

In Multi Tenant, three approaches dominate at the database layer:

1. Shared Database, Shared Schema

Everyone in the same table, differentiated by tenant_id. Simplest and cheapest.

Use PostgreSQL's Row-Level Security for extra safety:

2. Shared Database, Separate Schemas

Each tenant gets their own PostgreSQL schema. More isolation, same instance.

3. Separate Databases

Each tenant gets their own database. Maximum isolation, maximum cost.

Tenant Resolution: How to Identify Who's Who

Every request needs to identify the tenant. The most common strategies:

On the frontend, use a Context Provider:

Noisy Neighbor: The Multi Tenant Exclusive Problem

When one tenant burns through resources, everyone else suffers. The fix: per-tenant rate limiting.

The Hybrid Model: Silo + Pool (AWS SaaS Lens)

Pure Single vs pure Multi is a false dichotomy. Most mature SaaS products converge on a hybrid:

  • Pool tier (multi-tenant): free, starter, SMB plans. Shared everything. Cheap to serve, instant signup.
  • Silo tier (single-tenant): enterprise plans. Dedicated VPC, dedicated DB, dedicated encryption keys. Premium pricing.
  • Bridge tier: shared app, dedicated database. Middle ground.

Think airlines: economy shares the cabin, first class gets a suite, same plane. AWS codifies this in the SaaS Lens as Pool, Silo, and Bridge patterns. GitLab ships it explicitly: gitlab.com (pool) plus GitLab Dedicated (silo per enterprise, single-tenant SaaS in the customer's chosen AWS region). Public pricing isn't listed, but field reports and partner quotes consistently land in the high five-figures to low six-figures per year, with a 1,000-user minimum. Salesforce, Notion Enterprise, Datadog, all run hybrid. You're not picking a side, you're picking a default and selling the other as a tier.

Tenant Migration Nightmares

Here's what nobody tells you: going from Multi to Single (or vice-versa) is surgery without anesthesia.

  • Multi -> Single: extract one tenant's data from shared tables without touching the other 999. Referential integrity breaks. Shared sequences collide. Audit logs are interleaved. Expect weeks of migration scripts per customer.
  • Single -> Multi: worse. Every tenant's schema drifted over the years (custom fields, patched migrations, that one hotfix from 2022). Now unify them into a shared schema without data loss. Good luck.

This is why the day-one decision matters so much. Atlassian's multi-year Server-to-Cloud migration wasn't bad execution. It was the inherent cost of the model switch.

The Final Comparison

Here's the decision framework I use:

Choose Single Tenant when:

  • Compliance demands it (HIPAA, PCI-DSS, FedRAMP)
  • Fewer than 100 enterprise customers
  • Average ticket above $10,000/month
  • Extensive per-customer code customizations
  • SLA of 99.99%+ with penalties

Choose Multi Tenant when:

  • More than 1,000 SMB/mid-market customers
  • Average ticket below $500/month
  • Onboarding needs to be instant
  • Time to market is the priority
  • Customization happens through configuration, not code

Cost: The Reality of the Numbers

For 100 customers over 3 years:

  • Single Tenant: approximately $3.4M (infra + operations + development)
  • Multi Tenant: approximately $1.3M

Per-customer cost in Single Tenant is ~2.5x higher. But if your average ticket justifies it, the extra spend on security and isolation pays off.

Anti-Patterns I See Too Often

  • Queries without tenant filter: a SELECT without WHERE tenant_id exposes every customer's data
  • Relying only on the frontend for isolation: NEVER. The backend is the last line of defense.
  • Ignoring cost allocation in Single Tenant: without billing tags, you can't calculate margin per customer
  • Shared secrets across tenants: each tenant needs their own keys

FAQ

How bad is the noisy neighbor problem in real numbers? In shared PostgreSQL without per-tenant limits, one tenant running an unindexed analytical query can spike p99 latency for everyone by 5x-20x. Rule of thumb from production: reserve no more than 10% of total DB capacity per tenant in a pool, and cap connection pools per tenant. Without that, a single bad query takes the platform down.

What's the real performance cost of Row-Level Security? Typically 5-15% overhead on read-heavy workloads when policies are simple and indexes include tenant_id as the leading column. It gets ugly (30%+) when your policy involves subqueries or joins. Benchmark it. And always index (tenant_id, ...), not (..., tenant_id).

Should I use one Kubernetes namespace per tenant? Only in the silo model. Namespaces are a weak isolation boundary (shared kernel, shared control plane) and Kubernetes etcd starts groaning past a few thousand namespaces. For pool multi-tenancy, use app-level isolation. For silo, namespace-per-tenant works up to a few hundred; beyond that, cluster-per-tenant or vCluster.

Does GDPR data residency force Single Tenant? No, but it forces regional multi-tenancy. You need separate deployments per region (EU, US, APAC) with no cross-region data flow. Within a region, shared multi-tenant is fine. GDPR cares about where bytes live, not whether they share a table with another EU tenant.

How do I track billing/usage per tenant in Multi Tenant? Tag every write and every expensive read with tenant_id, emit usage events to a stream (Kafka, Kinesis), aggregate in a warehouse. Track: storage GB, API calls, compute seconds, egress bytes. Without this telemetry from day one, you'll have no idea which customers are profitable. Retrofitting it later is painful.

Key Takeaways

There's no universally right answer. Single Tenant and Multi Tenant solve different problems.

If you're starting a B2B SaaS: start Multi Tenant with Shared Schema + RLS. It's cheaper, faster to build, and covers 90% of scenarios.

If an enterprise customer asks for total isolation: offer it as a premium tier with pricing that matches. Terraform + Kubernetes make dedicated tenant provisioning automatable.

And if you're in healthcare, government, or fintech with strict compliance: Single Tenant from day one. The cost of retrofitting dwarfs the cost of starting right.