Multitenancy

Serving many tenants from one deployment — onboarding, tenant-isolated data, per-tenant schema deployment and the operational tooling around it. It is decided once, before anything is built, and narrows the artifacts in almost every capability downstream: most sharply in caching and anything else holding state in process.

Overview

InCAPassessed
SAP SHIPSby design
Node.js →

@sap/cds-mtxs Multitenancy, tenant provisioning and model extensibility for CAP.

@sap/cds Isolates tenants at runtime: every service call carries the tenant in its context and the framework connects it to that tenant's database. Provisioning, subscription and per-tenant deployment are @sap/cds-mtxs.

Java →

com.sap.cds:cds-feature-mt The CAP Java feature that makes a Maven application multitenant aware: tenant lifecycle events, per-tenant database containers, and the wiring to the Node.js MTX sidecar.

com.sap.cds:cds-services-bom Carries the tenant in the Request Context across every service call and thread, and opens tenant-specific database connections from it. Provisioning and subscription are cds-feature-mt.

Not covered: It stops at the runtime. Day-two operations — inspecting, upgrading and repairing tenants across a landscape — is where cap-js-community fills in, and that is community-org rather than core.

SourceMTX services — tenant provisioningchecked
THE COMMUNITY ADDS

InBTP/BAIPassessed

SaaS Provisioning is the registration: it makes an application subscribable by other subaccounts and calls that application back on every subscribe and unsubscribe. What the callback then has to do is why this capability reads so differently on the two doors.

SAP SHIPS

Present, not yet described.

Not covered: At subscription. The callback is where the work starts — tenant-isolated data and per-tenant schema deployment are the application's, and BTP neither performs nor verifies them.

Every provider behind this door is an SAP BTP service, so core-only is a assessment of the corpus rather than a quote from the core. what_core_does is left empty: no page has been checked that states an intent here, and the services themselves carry their own descriptions and links.

THE COMMUNITY ADDS

No community artifact is documented here.

Artifacts7

Group by7 of 7 artifacts
ArtifactSignals
CDS plugins1
@sap/cds-oysterWebAssembly sandbox for tenant-specific extension code in CAP
Signals
none
CLI tools1
@cap-js-community/mtx-toolCLI for operating tenants of multitenant CAP applications
Signals
none
Packages4
@sap/cdsCAP Node.js runtime
Signals
none
@sap/cds-mtxsMultitenancy, tenant provisioning and extensibility for CAP
Signals
none
com.sap.cds:cds-feature-mtMultitenancy for CAP Java: tenant lifecycle and per-tenant containers
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none
Services1
SAP Software-as-a-Service Provisioning serviceRegisters a multitenant application for subaccount subscriptions
Signals
none

Content26

Group by26 of 26 pieces
Piece, what it offers
From Concept to action: Hands-On with the CAP Operator and the Partner Reference Application
SAP Community, ChristianWeiss, BlogThe reasoningA recipeRunnable code
Building a SaaS Multitenant Application Using SAP CAP Framework — Without a Database
SAP Community, DebashishDas, BlogThe reasoningA recipeRunnable code
Build Solutions for SAP Cloud ERP with confidence
SAP Community, pankajkumar_agrawal, BlogThe reasoning
Show 23 more
Designing a Multi‑Tenant Solutions on SAP BTP – Architecture and Prototype Walkthrough
SAP Community, Avinash_Vaidya, BlogThe reasoning
Part 2: Runtime Architecture & Cost efficiency gains
SAP Community, ChristianWeiss, part 2 of 3, BlogThe reasoning
Kyma Evolution: Transforming SAP Kyma into a tailor-made SaaS Platform for sbs extensions
SAP Community, ChristianWeiss, part 1 of 3, BlogThe reasoning
Part 2: Architecting SaaS Resilience Against S/4HANA Variance
SAP Community, michal_majer, BlogThe reasoning
Building SaaS Products on SAP BTP
SAP Community, michal_majer, BlogThe reasoning
CAP multitenancy with Work Zone
SAP Community, Wouter Lemaire, Blog
Multitenant SaaS Application using CAP
SAP Architecture Center, SAP Architecture Center, Reference architectureThe reasoningA reference
Developing CAP java/node.js mixed mono Multitenant SaaS Applications with Shared Database
SAP Community, xuelong, BlogA recipeRunnable code
New majors
Event-Driven Multi-Tenant Architecture on SAP BTP with CAP and SAP Event Mesh
SAP Community, ale_biagi, BlogThe reasoning
Simplifying SaaS Self-Onboarding Automation using Terraform in Kyma and Cloud Foundry
SAP Community, martinfrick, BlogThe reasoning
Using the Terraform Provider for SAP BTP to simplify Subscriber Tenant Onboarding
SAP Community, martinfrick, BlogThe reasoning
Multitenant SaaS applications on SAP BTP using CAP - The Reloaded Version!
SAP Community, martinfrick, BlogThe reasoningRunnable code
SaaS Self-Onboarding and One-Domain Concept in SAP BTP, Kyma Runtime using CAP
SAP Community, martinfrick, BlogThe reasoningRunnable code
Core changed
Multitenant SaaS applications on SAP BTP using CAP? SAP BTP, Kyma Runtime!
SAP Community, martinfrick, BlogThe reasoning
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Expert Features
SAP Community, martinfrick, BlogThe reasoning
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Advanced Version
SAP Community, Alper Dedeoglu, BlogThe reasoning
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Basic Version
SAP Community, Alper Dedeoglu, BlogThe reasoning
Multitenant SaaS applications on SAP BTP using CAP? Tried-and-True!
SAP Community, martinfrick, BlogThe reasoning
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview
SAP Community, Tristan, BlogThe reasoningA recipeRunnable code
Core changed
Multitenant MTA: providing a Cloud Portal Service with FIORI apps to subscriber accounts
SAP Community, former_member1760, BlogThe reasoningRunnable code
Multitenant Business Applications with CAP | Hands-on Video Tutorials
SAP Community, dvankempen, BlogThe reasoning
Multitenant application using Cloud Application Programming Model (CAP)
SAP Community, former_member733211, BlogThe reasoningA recipeRunnable code
Core changed
Getting your head into Cloud Application Programming model multitenancy
SAP Community, andrew_lunde, BlogThe reasoningRunnable code
Core changed
Developing CAP java/node.js mixed mono Multitenant SaaS Applications with Shared Database
SAP Community, xuelong, BlogA recipeRunnable code
New majors

Seen working4

ArtifactSignals
Samples4
mtxs-reviewsMultitenant CAP application using cds-mtxs
No license
SAP-samples/btp-event-driven-multi-tenant-architectureCAP sample of SAP Event Mesh events feeding a multi-tenant SaaS app
none
SAP-samples/partner-reference-applicationPoetry Slam Manager, a multi-tenant SaaS reference app on SAP BTP
none
SPFI-Reference-ApplicationSpring Boot reference implementing the SPFI V2 tenant lifecycle API
Functional boundary

Details

What changed — and what it makes stale2
@sap/cds 7.0.0, CAP, Node.js

cds 7 dropped support for the old MTX package outright. @sap/cds-mtx, deprecated since cds 6, stopped running at all; @sap/cds-mtxs became the only supported multitenancy library for anything on cds 7 or later.

Makes stale:

Any tutorial or sample that provisions tenants through @sap/cds-mtx. That ran on cds 6; on cds 7 and later the app won't start until it migrates to @sap/cds-mtxs.

SourceCAP release notes, June 2023checked
@sap/cds-mtxs 1.0.0, CAP, Node.js

The core gained a rewritten multitenancy library, @sap/cds-mtxs, alongside the existing @sap/cds-mtx. Where the old library stored tenant extensions as source files and ran a build on the server on every activation, the new one stores only compiled csn files, runs the build locally before deploy, and drops the separate META-tenant container — tenant metadata now lives beside application data.

SourceMigration from Old MTX — capirechecked
Coverage
statecore and community, CAP
assessed
state in BTP/BAIPcore only, assessed
relationshipnarrow by design
also inBTP/BAIP
For your agent