Skip to content
ModuleM8 — Tenants at platform scale
After this session you canDecide how a new organization should be hosted, prepare and follow its onboarding on a shared deployment, and retire a tenant without losing what must be kept.
TimeFacilitated: 22 min · On your own: 21 min
Before you startModules 1 to 7. From ACSA: what a tenant is.
Go deeperTenant registry and lifecycle · Tenant & space provisioning · Functions in a multi-tenant deployment · Deployment capacity

◆ Orientation (1 min) — A second organization arrives

Section titled “◆ Orientation (1 min) — A second organization arrives”

Northwind’s parent group wants its sister company, Southwind Shipping, on Osos too, and expects more to follow. You could install a second release like Northwind’s, or put several organizations on one shared deployment. Everything you have done so far was for one tenant in one release. This session shows what changes at platform scale, at the depth an operator of a shared deployment needs.

▤ Concept (5 min) — Two ways to host tenants, and a tenant’s life

Section titled “▤ Concept (5 min) — Two ways to host tenants, and a tenant’s life”

One release per tenant, or a shared deployment

Section titled “One release per tenant, or a shared deployment”
One release per tenant (single mode)A shared deployment (multi mode)
HowOne osos release per organization, as in your lab (tenancy.mode: single, the default)One release serving many tenants (tenancy.mode: multi), often called a cell
IsolationSeparate pods, values and, usually, datastoresShared pods; each tenant has its own databases, keys, caches and gateway entries
Adding a tenantInstall a release (or let a control plane install one)An API call to the deployment’s tenant registry
SuitsFew, large or regulated organizations; per-tenant versionsMany organizations of similar size on one version
Per-tenant backup and restoreYour own backups of that release (M4-S3)The tenant backup API, with Percona Backup for MongoDB agents you run (M4-S3)

Some vendors run their own tenant management control plane, which installs a release per tenant from a template; as a customer operator you meet it only if your contract includes it. The rest of this session is about multi mode, because that is where the operator’s tenant work happens.

Each tenant has a record in the deployment’s tenant registry, kept by its cell-controller application. You never set a tenant’s status directly: you ask for what it should become, and a reconciler carries out and checks each step, retrying until it is confirmed.

flowchart LR
  P["provisioning"] -->|"every onboarding step done"| A["active"]
  A -->|"suspend"| S["suspended"]
  S -->|"activate"| A
  A -->|"offboard"| O["offboarding"]
  S -->|"offboard"| O
  O -->|"every removal step done"| X["offboarded<br/>(tombstone)"]

What to notice: there is no way back from offboarding. The record stays as a tombstone so the tenant’s id is never reused.

Onboarding is one request naming the tenant’s id (appId, which also names its databases), the MongoDB cluster to hold them, its host names, the host its sign-in runs on, its first administrator’s email, and optionally a brand from the deployment’s catalogue (M4-S2). The reconciler then checks the cluster has room, creates and seeds the tenant’s databases, prepares every application, creates its sign-in keys and clients (M4-S1), routes its hosts at the ingress, and publishes them to the gateway. About 45 seconds after the tenant becomes active, its administrator receives the set-password email.

Suspending removes the tenant’s gateway entries: nothing reaches it, but all its data, routes and sign-in setup are kept. Activating restores them.

Offboarding deletes the tenant’s data: its gateway entries, routes, functions, cached data, stored files and its nine databases. A restore works only on a tenant that still exists, so take the copies you need before you offboard: the databases, the stored files, and the master key that reads them.

The provisioning services, in one line each

Section titled “The provisioning services, in one line each”
  • Space provisioner: a shared function that creates or removes the Ingress and certificate for a space’s own host when a space is created or deactivated (M3-S1).
  • Function provisioner: builds and deploys the functions builders write, as Knative services; in multi mode each tenant’s functions run in a namespace of their own, with a resource quota and a network policy. A function is custom code an application calls from its automations; ACE teaches writing one.
  • Packaging: exports an application as a package and imports it into another space or tenant; environmentId stamps each export with the environment it came from.

You run and size these services; you do not write what runs inside them.

◇ Worked scenario (2 min) — Southwind on a shared deployment

Section titled “◇ Worked scenario (2 min) — Southwind on a shared deployment”

The group decides to run a shared deployment for its smaller companies, with Southwind first. You prepare Southwind’s onboarding.

Decide: which hosts? Southwind’s staff will use southwind.example.com and sign in at auth.southwind.example.com. The onboarding needs at least one host besides the sign-in host, because the administrator’s invitation returns them to an application host; with only the sign-in host, onboarding stays blocked. Every space host Southwind will ever use goes into the tenant’s domain list too: on a shared deployment the tenant owns all its hosts, and space-level routing does not apply.

Decide: which id? The appId never changes and names every database (app-southwind-data and so on), so it should be short, lowercase and stable: southwind, not southwind-2026-trial.

The request.

{
"appId": "southwind",
"mongoClusterRef": "primary",
"domains": ["southwind.example.com", "auth.southwind.example.com"],
"canonicalAuthHost": "auth.southwind.example.com",
"adminEmail": "it.admin@southwind.example.com",
"displayName": "Southwind Shipping",
"brand": "group-default"
}

Decide: is it done when the call returns? No. The call only records what the tenant should become. You read the record until its status is active; a step that is blocked names its reason (for example, the MongoDB cluster has no room). Then you check the administrator received the invitation, and run a smoke test on southwind.example.com.

Six months later, a trial tenant northstar is cancelled. Before you ask for offboarding, you export or back up its nine databases and its files, record the master key with them, and get written confirmation from the customer. Only then do you offboard, and you follow it until the record is offboarded.

✳ Discussion (8 min) — One release or a shared deployment?

Section titled “✳ Discussion (8 min) — One release or a shared deployment?”

The group has twelve small companies of 20 to 200 users each, and one regulated subsidiary whose auditors require its data on a separate database cluster under its own keys.

  1. How would you host the twelve, and how the regulated one? Why?
  2. What does the shared deployment add to your operations work that the single releases did not?

With a facilitator. Two groups each argue one hosting model for four minutes; then the room agrees the split and lists the extra operations work.

On your own. Write your answers to both prompts, then compare with the model answer.

Model answer
  1. The twelve on one shared deployment: one version, one set of pods, onboarding by API, a brand per company from the catalogue. The regulated subsidiary on its own release (single mode), with its own datastores and its own master key, which is the simplest way to show auditors the separation they require. A shared deployment could also give it a separate MongoDB cluster through mongoClusterRef, but its keys, pods and upgrades would still be shared.
  2. Extra work on a shared deployment: running the tenant registry and following each lifecycle operation to its final state; per-tenant monitoring (tenant metrics, fairness between tenants); capacity of each MongoDB cluster for new tenants; the brand catalogue; per-tenant backups with their own agents; and every upgrade now affects every tenant at once, so the release process must be stricter.

✓ Practice (5 min) — Check your understanding

Section titled “✓ Practice (5 min) — Check your understanding”
PracticeChoose one answer.

You onboarded a tenant with only its sign-in host in domains. Its record stays provisioning. Why?

  1. Explanation for A

    ✗ Incorrect

    Not this one: that would block an earlier step, with a capacity reason. See Southwind on a shared deployment.

  2. Explanation for B

    ✓ Correct

    Correct: give the tenant at least one host besides its sign-in host. See Southwind on a shared deployment.

  3. Explanation for C

    ✗ Incorrect

    Not this one: one request asks for active; the reconciler does the rest. See A tenant’s life on a shared deployment.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

A customer pauses its contract for three months and will come back. What do you do with its tenant?

  1. Explanation for A

    ✓ Correct

    Correct: suspension removes only the gateway entries. See A tenant’s life on a shared deployment.

  2. Explanation for B

    ✗ Incorrect

    Not this one: offboarding deletes its data, and the id can never be reused. See A tenant’s life on a shared deployment.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the reconciler would put them back; ask for the state you want instead. See A tenant’s life on a shared deployment.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose one answer.

A tenant was offboarded last week by mistake. Can last night’s platform backup bring it back?

  1. Explanation for A

    ✗ Incorrect

    Not this one: a tenant restore works only on a tenant that still exists. See A tenant’s life on a shared deployment.

  2. Explanation for B

    ✗ Incorrect

    Not this one: an offboarded tenant cannot be activated again. See A tenant’s life on a shared deployment.

  3. Explanation for C

    ✓ Correct

    Correct: which is why you take copies before offboarding, never after. See A tenant’s life on a shared deployment.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

A builder’s new function fails to deploy, and they ask you to look at “the code”. What is your part?

  1. Explanation for A

    ✗ Incorrect

    Not this one: writing functions is the builder’s and integrator’s job (ACE). See The provisioning services.

  2. Explanation for B

    ✓ Correct

    Correct: you run the service that deploys functions; what runs inside them belongs to their authors. See The provisioning services.

  3. Explanation for C

    ✗ Incorrect

    Not this one: functions are deployed by their own provisioner, outside the combined pods. See The provisioning services.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

↺ Recap (1 min) — After Module 8 you can

Section titled “↺ Recap (1 min) — After Module 8 you can”

After this module you can choose how an organization should be hosted, prepare and follow a tenant’s onboarding on a shared deployment, suspend and retire tenants without losing what must be kept, and say what the space, function and package services do.

Next. Module 9 is the capstone: Northwind’s operational-readiness package, built and rehearsed on your lab release.