Scrivio Interview library
LeadershipPrincipal7 min read · updated 12 November 2026

Your company sells to both small businesses and regulated enterprises that demand data residency and isolation. How would you set the long-term multi-tenancy strategy for the platform's data layer?

I would treat isolation as a set of product tiers rather than one architecture: a shared database for small customers, a dedicated database for customers who need stronger isolation, and a dedicated deployment in a chosen region for regulated enterprises, each with a clear price. Tenant routing and tenant migration become core platform features so a customer can move between tiers, data residency covers every copy of the data and not only the primary database, provisioning is automated so the cost of many isolated deployments stays under control, and compliance teams audit that each isolation claim is actually true.

Why this question is asked

Multi-tenancy, serving many customers (tenants) from one platform, is one of the decisions that is cheap to make early and very expensive to change later. A small bakery and a European bank want very different things from the same product: the bakery wants it cheap, the bank wants its data in Frankfurt, separated from everyone else's, with evidence. Interviewers ask this at the most senior level because the answer is not a single database pattern; it is a strategy that ties architecture, pricing, operations and compliance together. In this answer, we will recap the basic isolation models, turn them into product tiers, see why routing and migration are the heart of the platform, look at what data residency really covers, weigh the operational cost, and finish with how to keep isolation claims honest.

1A Quick Recap of Tenant Isolation Models

There are three classic ways to store data for many tenants. In the shared model, all tenants live in the same tables and every row carries a tenant_id column; the application, and ideally row-level security in the database, makes sure one tenant never sees another's rows. In the database-per-tenant model, each tenant gets its own database or schema on shared servers. In the deployment-per-tenant model, sometimes called a silo, a tenant gets its own application instances, databases, caches and queues, often in a region the tenant chooses.

Each step up buys stronger isolation and costs more. The shared model packs thousands of tenants onto one cluster, so the cost per tenant is a few cents, but a noisy tenant can slow everyone and a bug in a WHERE clause can leak data. A dedicated database removes most noisy-neighbour problems and makes per-tenant backup and restore easy. A dedicated deployment gives the strongest story for regulators, but it means one more environment to patch, upgrade and monitor.

Isolation tiers as product offerings
TierData layoutTypical customerRelative cost
StandardShared tables, tenant_id, row-level securitySmall businesses1x per tenant
IsolatedDedicated database on shared serversMid-market, security reviews10x to 30x
SovereignDedicated deployment in a chosen regionBanks, health, public sector100x or more
The numbers are illustrative; the point is that each tier has a real cost that pricing must cover.

2Turning Isolation Into Tiers With Clear Prices

The mistake I see most often is choosing one model for everyone. If we put every tenant in a silo, small customers become unprofitable. If we put everyone in shared tables, we lose the enterprise deals that require isolation. So the first decision is a product decision: we offer isolation tiers, and each tier has a name, a price and a written promise.

The reason to make it explicit is that isolation then stops being a favour negotiated in each sales call. Sales can say: the Sovereign tier gives you a dedicated deployment in the EU region, encrypted with your keys, at this price. Engineering knows exactly which few configurations it must support. Without that, we end up with fifty slightly different special arrangements, each one a source of incidents.

3Why Tenant Routing and Migration Are Core Platform Features

Once there are several tiers, every request must be sent to the right place. A tenant directory, a small, highly available service or table, maps each tenant to its tier, region and database. The Java services look up the tenant from the token at the edge, and a routing layer (for example a Spring AbstractRoutingDataSource keyed by the tenant's location) picks the connection pool. No service should hard-code where a tenant lives.

Customers also change. A startup on the Standard tier grows and signs a contract that needs isolation; an enterprise wants to move from the US region to the EU. If moving a tenant is a manual project, it takes months and every move is risky. So migration has to be a platform capability: copy the tenant's data to the new location, keep it in sync with change data capture, verify counts and checksums, briefly pause writes for that tenant, flip the entry in the tenant directory, and keep the old copy for a rollback window before deleting it.

Step throughMoving a tenant from Standard to Isolated
  1. Provision target databaseautomated, from a template
  2. Bulk copy tenant rowsfiltered by tenant_id
  3. Stream changes with CDCuntil lag is near zero
  4. Counts and checksums match?
    YesPause writes for the tenantNoKeep syncing and investigate
  5. Flip tenant directory entrynew requests route to the new database
  6. Keep old copy for rollbackthen delete it with evidence

6 steps in order. Play them, or step through them one at a time.

4What Data Residency Really Covers

Data residency means the customer's data stays within an agreed geography. A common failure is to place the primary database in Frankfurt and declare victory. But the same data also lives in read replicas, backups, write-ahead log archives, search indexes, caches such as Redis, message topics, analytics exports, application logs and error trackers. If our logs ship stack traces containing customer emails to a US logging service, the residency claim is false.

So residency has to be designed for the whole data path. Each region gets its own complete stack, including backups and observability, and the tenant directory records the region so every component can check it. Global services, such as billing or the tenant directory itself, should hold only the minimum metadata and should be reviewed so they do not quietly collect personal data.

5Weighing Operational Cost Against Revenue

Every dedicated deployment is another place where an upgrade can fail. With 5 silos, a team can upgrade by hand. With 300, manual work would consume the whole team. So I would only sell the dedicated tiers once provisioning, schema migrations, upgrades, monitoring and backups are fully automated, and I would run all silos from the same versions with the same pipeline, rolled out in waves.

I would also look at the numbers each quarter. If a Sovereign tenant pays 200,000 a year and its deployment costs 40,000 in infrastructure plus a share of an on-call engineer, the tier pays for itself. If we have many small customers on dedicated databases because a salesperson gave it away, that is a pricing problem to fix, not an engineering problem to absorb.

6Keeping Isolation Claims Audited and True

Finally, isolation is a promise we make in contracts, so it must be verified, not assumed. I would involve security and compliance teams from the start: they help write the tier definitions, they review the evidence, and they sit in on design reviews for anything that touches tenant data. Automated tests try cross-tenant access on every release, infrastructure is defined as code so auditors can see where each region's data goes, and penetration tests target tenant boundaries specifically.

The reason this matters is simple: an isolation claim that turns out to be false is worse than not making the claim. It loses the customer, and in regulated industries it can mean fines.

7Follow-up questions

How would you start if the platform today is entirely shared tables?

I would not rebuild everything. I would first add the tenant directory and route all data access through it, even though every entry initially points to the same database. That one change makes it possible to move a tenant later. Then I would add row-level security as a safety net for the shared tier, build the migration tooling, and launch the Isolated tier with a few design-partner customers before offering the full regional deployments.

Is schema-per-tenant a good middle ground?

It can be for a few hundred tenants, because it gives logical separation and easy per-tenant restore on shared servers. With many thousands of schemas, catalog size, migration time and connection pooling become painful, since every schema change must run thousands of times. I would use it only when the tenant count for that tier is known to stay small.

What about customers who want to hold their own encryption keys?

That fits naturally in the higher tiers. Each tenant's data is encrypted with a key held in a key management service under the customer's control, so revoking the key makes the data unreadable. It also helps with deletion, because destroying the key effectively erases backups we cannot rewrite.

8Conclusion

In this answer, we saw that a long-term multi-tenancy strategy is a set of isolation tiers sold as products with clear prices, from shared tables to dedicated regional deployments. Tenant routing and tenant migration are the platform features that make those tiers workable, data residency has to include backups, logs, caches and every other copy, automation keeps the cost of many deployments affordable, and compliance teams keep the isolation claims audited and true.

What to say in the interviewAbout 80 seconds aloud

Open with

I would not pick one multi-tenancy model for everyone, because small businesses and regulated enterprises need different things and are willing to pay different amounts. I would define isolation tiers as products: a shared tier with tenant_id and row-level security, an isolated tier with a dedicated database, and a sovereign tier with a dedicated deployment in the customer's region, each with a clear price and a written promise.

Then, if they want more

The most important platform investment is a tenant directory and routing layer, so no service hard-codes where a tenant lives, plus automated tenant migration using bulk copy and change data capture, so a customer can move between tiers or regions without a project.

For data residency I would make sure every copy stays in the region: replicas, backups, WAL archives, caches, search indexes, topics and logs, not just the primary database. Before selling dedicated tiers widely I would automate provisioning, upgrades and monitoring, and I would review each quarter whether the revenue from each tier covers its operational cost.

Finally, I would involve security and compliance from day one, with cross-tenant tests and audit evidence, so our isolation claims are verifiably true.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your company sells to both small businesses and regulated enterprises that demand data...": https://scrivio-interview-library.netlify.app/databases/database-scaling/f88f9fa894/