Case study · SaaS platform architecture

Re-architecting a SaaS platform so one tenant can't slow down the rest

A few heavy tenants could degrade the service for everyone, and enterprise buyers were asking for isolation guarantees the platform could not evidence. The goal was tiered tenancy: pooled by default, dedicated where it is worth paying for, with per-tenant limits and isolation proven by tests rather than asserted in a questionnaire.

Case studySaaS · B2B platformSumanta Mukhopadhyay8 min read
#platform#architecture#kubernetes#security#observability
CASE STUDY · CASE STUDY · SAAS PLATFORM ARCHITECTURE28 Oct 2026 · 01:28 GST
At a glance
SectorSaaS · B2B platform
My roleFractional CTO and principal architect
EngagementArchitecture, delivery leadership and hand-off
ScopeTenancy model, routing, data isolation, quotas, observability
What changed
  • A tenancy model with pooled and dedicated tiers, chosen per tenant rather than per platform
  • Per-tenant limits that stop one tenant's load from degrading others
  • Tenant context carried end to end, so usage, cost and incidents are visible per tenant
  • Isolation evidence produced by automated tests, ready for enterprise security reviews
MongoDBKubernetesGateway APIResourceQuotasOpenTelemetryTenant context propagationInfrastructure as codeIsolation test suite

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

A B2B SaaS platform had grown on a single shared architecture: one application deployment, one database cluster, every tenant in the same collections. That served it well while tenants were similar in size. As larger customers arrived, two problems appeared together. A heavy import or reporting job from one tenant could slow the service for everyone. And enterprise prospects began asking, in security reviews, how their data was isolated and whether they could have dedicated infrastructure.

The team's instinct was to give big customers their own copy of everything. That answers the sales question and creates an operations problem: many stacks to upgrade, monitor and pay for.

What had to be true

  • Isolation as a choice per tenant, not one model forced on all.
  • One codebase and one release process across every tier.
  • Per-tenant limits at every shared resource.
  • Tenant context everywhere: in routing, data access, logs, traces and cost.
  • Isolation proven by tests, so the answer to a security review is evidence.

Architecture

AWS's tenant isolation guidance frames the options as silo (dedicated resources), pool (shared resources) and bridge (a mix chosen per layer)1. The design adopted that vocabulary directly: a pooled tier for most tenants and a dedicated tier for those whose requirements justify it, running the same services.

Edge
Identitytenant in tokenGateway APItenant-aware routingRate limitsper tenant
Control plane
Tenant registrytier, region, limitsProvisioninginfrastructure as codePlan and quota configversioned
Compute
Pooled namespaceshared servicesDedicated namespacesper tenantResourceQuotasper namespace
Data
Pooled clustertenantId on every documentDedicated database or clusterenterprise tierData access layertenant filter enforced
Assure
Isolation testsevery buildOpenTelemetrytenant attributesPer-tenant usagecost and capacity
Layered architecture: one control plane decides where each tenant runs; the same code serves both tiers.

The data flow, end to end

  1. AuthenticateToken carries the tenant identifier; nothing downstream trusts a header alone
  2. RouteGateway looks up the tenant's tier and sends the request to pooled or dedicated services
  3. LimitPer-tenant rate and concurrency limits applied before work starts
  4. Access dataData layer injects the tenant filter or selects the tenant's database
  5. ObserveTenant context propagated on traces, metrics and logs
  6. AccountUsage aggregated per tenant for capacity, cost and plan enforcement
Tenant context is set once at the edge and carried through every hop.

On the data side, MongoDB's guidance compares database-per-tenant with shared collections keyed by a tenant field, and notes that the shared model needs every query to filter by tenant3. That requirement was moved out of individual queries and into one data access layer. Detail in MongoDB multi-tenant SaaS patterns.

The hard part: noisy neighbours at every layer

Noisy neighbours are rarely one bottleneck. Limits had to exist at each shared resource, or load simply moved to the next one. The Kubernetes documentation treats noisy neighbours as a core multi-tenancy concern and points to resource quotas and node isolation as controls2; quotas cap aggregate consumption per namespace5. The layers addressed were:

  • Requests: per-tenant rate and concurrency limits at the gateway.
  • Background work: per-tenant queues or fair scheduling, so one tenant's bulk import cannot starve others.
  • Compute: dedicated namespaces with quotas for the dedicated tier; resource requests and limits in the pool.
  • Database: indexes that start with the tenant key, query timeouts, and heavy reporting moved off the primary path.

None of that is manageable without seeing it per tenant. OpenTelemetry baggage carries key-value context such as a tenant identifier across service boundaries4, which let traces and metrics be broken down by tenant. More in Kubernetes multi-tenancy.

Isolation you cannot test is a claim. Isolation with a failing test when it breaks is a control.

How the engagement ran

Product and sales
  1. Define tier offers
  2. Agree who qualifies
  3. Use isolation evidence
Engineering
  1. Tenant context and data layer
  2. Limits at each layer
  3. Isolation test suite
Platform
  1. Provision dedicated tier
  2. Per-tenant dashboards
  3. Migrate tenants between tiers
Tiering is a product decision as much as an engineering one.
Phase 1Assess
  • Shared resource inventory
  • Noisy neighbour incidents
  • Enterprise requirements
Phase 2Foundations
  • Tenant context end to end
  • Data access layer
  • Per-tenant observability
Phase 3Limits and tiers
  • Gateway limits
  • Fair background work
  • Dedicated tier provisioning
Phase 4Prove and hand off
  • Isolation tests in CI
  • Tier migration runbook
  • Security review pack
Foundations first: without tenant context, neither limits nor evidence are possible.

Key decisions and trade-offs

DecisionAlternativeWhy
Pooled default, dedicated by exceptionA stack per enterprise tenantIsolation where it pays, without multiplying operations
One codebase across tiersForked enterprise editionOne release process; no drift between tiers
Tenant filter in a data access layerFilter in each queryOne place to enforce and test
Gateway API for routingRouting logic in each serviceTier routing declared at the edge
Isolation tests in CIAnnual manual reviewContinuous evidence; regressions caught before release

What I'd do again, and differently

Again: get tenant context right before anything else, and make isolation a test suite rather than a document. Differently: agree the tier definitions with product and sales earlier. The engineering was straightforward once everyone agreed what "dedicated" promised and who could buy it.

If your platform is facing the same pressures, the fractional CTO page describes how I work with teams on it, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
    Multi-tenancyKubernetes
  3. 3
  4. 4
    BaggageOpenTelemetry
  5. 5
    Resource QuotasKubernetes
FAQ

Common questions

Should every enterprise customer get a dedicated stack?

No. Dedicated tiers cost more to run and operate. Offer them where isolation, residency or performance requirements justify it, and keep most tenants pooled with strong logical isolation and limits.

How do you prove tenant isolation to a buyer?

With automated tests that attempt cross-tenant access at each layer and fail the build if they succeed, plus the architecture and controls that explain why. Evidence from tests is more convincing than a questionnaire answer.

What causes noisy neighbour problems?

Shared resources without per-tenant limits: database capacity, compute, queues and connection pools. The fix is tenant-aware limits at each shared layer and observability that shows which tenant is consuming what.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.