Monday, April 28, 2025

Everyone says ‘multi-tenant’, nobody means the same thing

Joaquin Colacci

"Multi-tenant" is one of the most overloaded terms in modern SaaS architecture. To an infra engineer, it means containers isolation, namespaces, and routing. To a frontend team, it’s custom domains and auth management. For data teams, it’s about isolating data. For backend devs, it’s juggling all of the above. Everyone says “multi-tenant”, but few mean the same thing. This post breaks down what it means across the stack, and why aligning your team’s understanding matters more than you think.

Overview

Multi-Tenancy in the Frontend

For frontend developers and companies, when they are referring to multi-tenant applications, they are usually talking about things:

  • Subdomains: handle multiple subdomains, e.g. tenant.domain.com to serve a single tenant.
  • SSL Certificates: a wildcard certificate to handle all your subdomains, or one certificate per domain, with the first one getting more traction.
  • User management: tenants can be organizations, environments or just projects, with different scopes that the application needs to handle and where the user can decide from which scope to access

Companies like Vercel refer to multi-tenant just subdomains and SSL certificates.

Multi-Tenancy in the Data Teams

For data teams, whether they're working with analytics or application (OLTP) databases, multi-tenancy typically refers to database-level architecture and the choice of isolation strategy:

  • Data isolation: Schema vs. database isolation, row-level security/access (RLS/RLA), or dedicated instances. The key decision factors include performance, isolation requirements, scalability, and cost.

Multi-Tenancy for DevOps

For DevOps, the concepts of multi-tenancy are the most broad, almost each part of infrastructure components can be a multi-tenant component, even Vault has multi-tenant capabilities. But they mostly refer to multi-tenancy as:

  • Namespace isolation: Many multi-tenant systems use logical isolation units like Kubernetes namespaces or Vault namespaces to segregate resources. These act like internal subdomains for routing and policy enforcement across the infrastructure.
  • Network and proxy routing: Reverse proxies, service meshes, and ingress controllers must route requests based on tenant-aware rules (e.g., subdomain patterns, path prefixes, or headers).
  • SSL Certificates: Just as frontend teams deal with tenant-specific subdomains, DevOps is also responsible for provisioning SSL certificates for internal services.
  • Container-level isolation: Tenants may run on shared clusters, but container runtime policies, node affinity, and resource quotas are used to prevent noisy neighbors and lateral movement—much like using separate databases in multi-tenant databases.

Multi-tenancy in the Backend

Backend developers are the glue between infrastructure, data, and frontend layers in a multi-tenant architecture. Their core responsibility is to manage tenant context consistently and securely across every request, whether it's coming through an API, job queue, or internal service. This includes:

  • Context propagation: Extracting tenant IDs from headers, sessions, or tokens and passing them downstream to services, databases, caches, and logs.
  • Request isolation: A tenant can never access another tenant's data, even under edge cases or failures. Even thought data teams can reduce the blast radius here, backend developers should also take care on this task.
  • Testing: Multi-tenant bugs often hide in untested combinations (e.g., a background job picking up the wrong tenant). Logging per-tenant, writing multi-tenant test cases, and isolating observability data are crucial.
  • Per-tenant configuration: Some systems support tenant-specific feature flags, rate limits, locales, or authentication providers. The backend has to resolve and apply these settings in real time.

Conclusion: Define It, Don’t Assume It

  • Multi-tenancy is an architectural choice, not a single concept.
  • Define it for your system explicitly — across layers.
  • Don't build a "multi-tenant" SaaS until your team agrees on what that even means.
Fahren - multi-tenant strategies