CapabilityOperations & RuntimeNode.js, read from its artifacts

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.

Showing artifacts, examples and content with confirmed Node.js applicability. View All CAP

Overview

SAP SHIPS
@sap/cds-mtxs

Tenant provisioning, tenant-isolated persistence and per-tenant model deployment, served from an MTX sidecar once cds add multitenancy has switched it on.

@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.

SourceTransaction Management — capirechecked

A Node.js coverage assessment has not been written. View all flavors

THE COMMUNITY ADDS

A Node.js coverage assessment has not been written. View all flavors

Artifacts5

5 of 5 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
Packages2
@sap/cdsCAP Node.js runtime
Signals
none
@sap/cds-mtxsMultitenancy, tenant provisioning and extensibility for CAP
Signals
none
Services1
SAP Software-as-a-Service Provisioning serviceRegisters a multitenant application for subaccount subscriptions
Signals
none

Content1

Group by
Piece, what it offers
Developing CAP java/node.js mixed mono Multitenant SaaS Applications with Shared Database
SAP Community, xuelong, BlogA recipeRunnable code
New majors
Developing CAP java/node.js mixed mono Multitenant SaaS Applications with Shared Database
SAP Community, xuelong, BlogA recipeRunnable code
New majors

Seen working1

ArtifactSignals
Samples1
SAP-samples/btp-event-driven-multi-tenant-architectureCAP sample of SAP Event Mesh events feeding a multi-tenant SaaS app
none

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, Node.js, derived
also inBTP/BAIP
For your agent