System designby Learnastra

System-design interview · Extended interviews

Design a multitenant SaaS platform

By Anup Rai

Build a shared business application with end-to-end tenant scope, fair resource use and a controlled move that never creates two active write owners.

You will learn to

  • Carry verified tenant identity through APIs, database relationships, caches, jobs and files.
  • Justify pooled storage, independent cells and exceptional dedicated placement.
  • Prove a tenant cutover with in-flight writers, durable decisions and safe retry.

Practice in this chapter

8 interview questions with model answers and follow-ups.

Go to interview practice

Useful foundations: Databases, data models, and ACID transactions · Data partitioning and sharding · Design an API rate limiter · Production readiness: SLI, SLO, observability, and recovery

Workload and timing examples are interview assumptions.

01Make tenant scope the first architectural boundary

A multitenant SaaS serves several customer organizations on shared infrastructure. A tenant is one such organization. Sharing servers does not mean sharing permissions or letting one customer consume everyone’s resources. Ask whether users may belong to several organizations and whether ordinary customers can share storage. Here they can, while selected large or constrained customers may receive dedicated placement.

T7 and T8 each own invoice 17. The local invoice number is therefore not the full record identity. A request authenticates user U7, verifies permission to act for T7, resolves T7’s placement, and reads (T7,17). A cache hit, export or download must preserve the same scope; checking SQL alone is insufficient.

The smallest complete flow is authenticate → authorize active tenant/action → execute scoped query → return only that representation. Begin with one pooled application/database. Add a cell, an independently operated slice of compute and data serving a bounded tenant set, when capacity or failure isolation justifies it. Dedicated infrastructure can isolate resources, but it cannot repair an application that trusts an attacker-supplied tenant field.

02Functional requirements

Agree on what the service must do before choosing its components.

  1. Manage organizations and members. Support tenant/member lifecycle with users permitted to belong to several organizations; authorize the active organization and action on every operation.
  2. Manage invoices. Create, read and update tenant-scoped invoices with safe retries and conflict handling. Cross-tenant reporting or sharing needs an explicitly privileged or consented path; ordinary invoice APIs never accept a wildcard tenant.
  3. Run bounded exports. Create asynchronous exports, inspect their progress and download only authorized results. Revalidate the initiating actor before reading and exposing an export; removing a member must not leave a perpetual grant.
  4. Manage tenant resources. Apply quotas, expose usage and place eligible customers in shared or dedicated capacity according to their constraints.
  5. Operate the tenant lifecycle. Move, restore and delete one tenant through scoped, audited operations. Permit an explicit maintenance window during cutover rather than promising uninterrupted movement.

03Non-functional requirements

Use these hypothetical requirements for the worked interview. Confirm the assumptions with the interviewer; the numerical targets require testing and are not measured results. For latency, p95 and p99 mean that 95% and 99% of measured delays, respectively, are no greater than the reported value.

  1. Workload. Assume 10,000 tenants with 100 users each, ten percent concurrently active and five requests/minute per active user. The resulting estimate is about 8,333 requests/s, with a fivefold peak near 41,667/s; skew matters more than the average tenant.
  2. Latency and availability. Target invoice-read p95 below 200 ms, write p95 below 400 ms and 99.95% availability per cell. A cell is an independently operated slice of compute and data. Measure tenant cohorts so a global average cannot hide one customer’s outage; explicitly account for the agreed migration maintenance window.
  3. Logical isolation and current permission. A caller cannot read or mutate another tenant’s rows, cache entries, jobs or files. Operator tools require scoped authorization and audit too.
  4. Resource and placement isolation. One tenant must not exhaust shared database, CPU, queue or connection capacity. Meet its agreed region, key, administration and recovery constraints. Separate schemas alone do not reserve resources.
  5. Durability and recovery. Acknowledged writes survive the selected database-node failure under the actual replication policy. For recovery from backup after a larger loss, the ordinary tier is separate: assume at most 24 hours of recoverable data loss and restoration within four hours for a 1 GB tenant; larger or stricter tenants need separately agreed recovery targets. Verify a tenant restore in an isolated environment, not by overwriting the pooled database.
  6. One tenant history. Movement must not leave two active writers. Lost-response retries retain their original operation identity, and a client that just created an invoice reads from a path that includes that commit.

04Prove one pooled application before distributing it

The baseline has one application, relational database, scoped cache and private object store. A read authenticates U7, checks invoice-read in T7, looks up the T7 cache key, and on a miss executes the parameterized composite-key query. Authorization is required on both paths; a cache must not bypass it.

Invoice-creation transaction

  1. Initialize scope. Begin a transaction and initialize trusted tenant context.
  2. Check retry identity. Look for the scoped replay key.
  3. Validate the relationship. Check customer (T7, 4).
  4. Save and commit. Insert invoice (T7, 18) and its replay result together, then commit.

A database foreign key guards the relationship in addition to application checks.

Row-level security can enforce tenant policies in the database as defense in depth. Use an appropriately constrained application role, not a table owner or bypass role, and transaction-local context so pooled connections do not retain the previous request’s tenant. Arbitrary privileged SQL is outside that protection.

An export worker loads J8’s durable context, rechecks current permission, executes bounded scoped pages and writes an immutable T7-owned object. Completion records the exact object version. Download authorization happens again when requested. These checks establish logical isolation before any discussion of schemas, cells or dedicated databases; moving an insecure query into another topology would merely move the leak.

Design diagramOne pooled but tenant-scoped application

Trusted scope reaches every storage and background path.

One pooled but tenant-scoped applicationTrusted scope reaches every storage and background path. client to api: Requested tenant and action; api to cache: Authorized T7 representation; api to db: Scoped transaction; db to jobs: Durable T7 / U7 job; jobs to files: Verified T7-owned exportRequested tenant and actionAuthorized T7 representationScoped transactionDurable T7 / U7 jobVerified T7-owned exportCLIENTU7 requesting T7SERVICEMembership andaction checksSTOREComposite-keytenant DBSTORETenant-aware cacheWORKERScoped exportworkerSTOREPrivate versionedobjectssyncasync
Read each connection in order
  1. syncRequested tenant and actionU7 requesting T7 → Membership and action checks
  2. syncAuthorized T7 representationMembership and action checks → Tenant-aware cache
  3. syncScoped transactionMembership and action checks → Composite-key tenant DB
  4. asyncDurable T7 / U7 jobComposite-key tenant DB → Scoped export worker
  5. syncVerified T7-owned exportScoped export worker → Private versioned objects

05Size for expensive tenants and operations

Assume 100 users/tenant, ten percent simultaneously active and five requests per active user/minute. That gives 100,000 active users and about 8,333 requests/s, with a fivefold peak near 41,667/s. The mean tenant uses only 0.83 requests/s, but one tenant producing 20% of base traffic already contributes about 1,667/s.

A hundred cells with about 100 tenants each would average 417 peak requests/s per cell. That count is a placement starting point, not a load-balancing proof. Use observed CPU, query cost, storage and batch demand; a single large tenant may exceed an otherwise ordinary cell.

Assume an invoice read uses 2 ms of database CPU. An export scanning one million rows at 100 microseconds each uses 100 CPU-seconds, equivalent to 50,000 such reads. Charging each operation one request token misses this disparity. Bound active exports, query time, scanned/output bytes and connections, and reserve interactive capacity.

At 1 GB of customer data per tenant, logical storage is 10 TB, or at least 30 TB for three copies before indexes/logs/backups. Moving a 1-TB tenant needs another copy plus change-log headroom. A20-MB/s write stream produces 72 GB during an hour-long copy; the destination must replay faster than arrival before the final pause can be short.

06Keep requested scope separate from trusted scope

Read an invoice

GET /tenants/T7/invoices/17

The URL names T7; it does not prove U7 belongs to T7. Middleware verifies membership and permission for the action, then passes the verified tenant and caller to downstream services. Those services validate this context instead of trusting a tenant header supplied by the user.

Create an invoice

POST /tenants/T7/invoices
Request information Meaning
Operation-scoped idempotency key Identify this intended creation so a retry can recover its result.
Customer identity The customer within T7, such as customer 4.
Amount and currency Use integer minor units with an explicit currency.

Save the replay result with the invoice transaction. A duplicate identical request returns the same invoice; a conflicting payload under that key fails. Update APIs use expected row versions to prevent lost edits.

Record relationships and cache identity

Record or lookup Identity or required relationship Purpose
Invoice Primary key: (tenantId, invoiceId) Invoice 17 in T7 differs from invoice 17 in T8.
Customer reference (tenantId, customerId) references Customer(tenantId, id) An invoice in T7 cannot accidentally reference T8’s customer 4.
Cached representation Tenant, object and representation version; audience when field visibility differs Prevent one scope or audience from receiving another’s representation.

Export, file and pagination records

Record Information bound to it
Export job J8 Tenant, initiating actor, operation identity and filters. Persist these before enqueueing the job ID.
File metadata Tenant ownership. A T7/ object-key prefix is naming, not authorization.
Pagination cursor Tenant, filters and ordering, so the cursor cannot silently move to another tenant or query.

07Repair noisy-neighbor and failure-scope limits

First introduce fair tenant scheduling and separate interactive/batch budgets. The trigger is a tenant submitting thousands of expensive exports while ordinary reads wait. Fair queues and per-tenant active-job limits preserve useful service; the cost is scheduler state and sometimes idle reserved capacity. Adding application replicas without database budgets can worsen contention.

Next introduce cells when one pooled database’s capacity or failure impact becomes too large. A tenant directory maps T7 to cell C2, region, tier and placement version 8. Each cell has its own compute and replicated data capacity, so many failures and rollouts affect a bounded customer set. Shared identity and directory services still require their own availability design.

Dedicated placement becomes justified by sustained resource pressure or explicit residency, key, recovery or administrator constraints. Separate schemas primarily organize namespaces; they do not reserve CPU. Dedicated databases and compute add stronger administrative/resource boundaries at higher fleet and utilization cost.

Keep the same application contract across pooled and dedicated placements. A cell should not become a special bypass of tenant authorization. Movement, restoration and deletion are controlled lifecycle operations with durable state and audit, not ad hoc routing edits or unrestricted copies between databases.

08Trace scoped reads, writes and exported bytes

U7’s create request resolves T7’s current cell and supplies the original operation key. The cell checks that T7 is active there, initializes trusted tenant context, and commits the invoice with its replay result. A placement change returns a retriable error so the router can refresh its directory entry. Reusing the key avoids creating a new invoice after a lost response.

A read resolves the placement, authorizes the exact object and returns only scoped fields. For the agreed read-your-write requirement after invoice creation, use the primary or a replica known to include that commit. A random lagging replica can make the new record appear missing. This is why the agreed contract cannot treat all replicas as interchangeable.

Export workers carry durable tenant and actor context. Before reading and exposing results, they recheck the current permission and placement. Their database work uses the same resource limits and scoped access as ordinary requests.

For downloads, choose an authenticated gateway that checks current tenant membership and permission for the immutable object version before serving a new request. This matches the baseline’s repeated download authorization. A short-lived presigned URL is an alternative with a weaker expiry-bound contract: possession may permit access until expiry after membership changes. A tenant prefix or a user name embedded in a transferable URL does not supply that enforcement.

Design diagramRoute each tenant to a cell with its own capacity

The router resolves the tenant placement, then sends the operation to that cell. Each cell retains tenant checks, scoped caching and bounded export work. Downloads pass through current authorization before the private object store supplies bytes; a cell boundary does not replace permission checks.

Route each tenant to a cell with its own capacityThe router resolves the tenant placement, then sends the operation to that cell. Each cell retains tenant checks, scoped caching and bounded export work. Downloads pass through current authorization before the private object store supplies bytes; a cell boundary does not replace permission checks. client to router: Scoped API or download; router to directory: Resolve current placement; router to cellA: Tenants placed in A; router to cellB: Tenants placed in B; cellA to dataA: Scoped transactions; cellB to dataB: Scoped transactions; cellA to objects: Store or authorized download; cellB to objects: Store or authorized downloadScoped API or downloadResolve current placementTenants placed in ATenants placed in BScoped transactionsScoped transactionsStore or authorized downloadStore or authorized downloadACTORTenant userSERVICEAuthenticatedrequest routerSTORETenant placementdirectorySERVICECell A API, cache andjobsSTORECell A replicateddatabaseSERVICECell B API, cache andjobsSTORECell B replicateddatabaseSTOREPrivate exportobjectssync
Read each connection in order
  1. syncScoped API or downloadTenant user → Authenticated request router
  2. syncResolve current placementAuthenticated request router → Tenant placement directory
  3. syncTenants placed in AAuthenticated request router → Cell A API, cache and jobs
  4. syncTenants placed in BAuthenticated request router → Cell B API, cache and jobs
  5. syncScoped transactionsCell A API, cache and jobs → Cell A replicated database
  6. syncScoped transactionsCell B API, cache and jobs → Cell B replicated database
  7. syncStore or authorized downloadCell A API, cache and jobs → Private export objects
  8. syncStore or authorized downloadCell B API, cache and jobs → Private export objects

09Move a tenant with an explicit maintenance pause

The chosen interview design permits a maintenance pause when moving a tenant. Transfer T7 in this order:

  1. Freeze the source. Stop T7’s mutations at C2.
  2. Drain admitted work. Wait for already admitted writes and background updates to finish.
  3. Copy stable data. Transfer the now-stable tenant state.
  4. Verify the destination. Check C5 before activation.
  5. Switch authority. Change the directory and enable T7 at C5.

Reads can continue from the frozen source if the product accepts that view.

Every writer must encounter the freeze check in storage or in a shared write path. Removing a frontend route is insufficient: old workers and cached routes may still reach C2. Keep C2 write-disabled after the move, so a stale request gets a placement-change error instead of changing the old copy.

Copy invoices, related rows, completed operation keys and durable jobs. Verify scoped counts, checksums and relationships before activation. A copied replay result lets a client retry an invoice whose successful response was lost. The directory changes only after the destination is ready.

For a large tenant, the pause may be too long. A future refinement copies a consistent snapshot while the source remains active, then catches up its changes before a short final freeze. That requires a reliable change log and recovery protocol. Present it as an extension; the simple design makes a longer, explicit availability tradeoff instead of promising zero-pause movement.

10Check writes around the maintenance boundary

Follow one invoice through the maintenance pause. If U7’s write was admitted before the freeze, the move waits for it to commit or abort. A committed invoice and its replay result are therefore present in the stable copy. If the request arrives after the freeze, C2 rejects it without a mutation. The client later retries against C5 under the same operation key.

This reasoning depends on including background writers. An export-completion update or administrative import cannot continue changing T7 behind the maintenance boundary. The freeze is a tenant lifecycle state enforced by the mutation path, not a flag that only the public API happens to check.

Record movement progress durably so a coordinator restart can inspect what completed. When activation is uncertain, keep the source frozen and investigate or finish the destination transition. A timeout does not prove that the destination accepted no writes. Reopening both sides would exchange a visible outage for divergent customer records.

Once C5 accepts writes, pointing the directory back to the old copy would lose those changes. Recovery must repair C5 or perform another controlled transfer. Full coordinator fencing and continuously replicated migration are advanced protocols. The interview design accepts a recoverable maintenance window and establishes one active writer before it claims service is restored.

Request traceOne tenant changes placement during a maintenance pause

Freeze and drain the source before copying; enable only one destination.

One tenant changes placement during a maintenance pauseFreeze and drain the source before copying; enable only one destination. move to source: Freeze new T7 mutations; writer to source: Finish previously admitted transaction; source to dest: Copy stable rows and operation results; move to dest: Verify tenant copy; move to dest: Activate and update directoryPARTICIPANTInvoice writerPARTICIPANTC2 tenant guardPARTICIPANTMigrationauthorityPARTICIPANTC51. Freeze new T7 mutations2. Finish previously admittedtransaction3. Copy stable rows and operation results4. Verify tenant copy5. Activate and updatedirectorysync
Read each connection in order
  1. syncFreeze new T7 mutationsMigration authority → C2 tenant guard
  2. syncFinish previously admitted transactionInvoice writer → C2 tenant guard
  3. syncCopy stable rows and operation resultsC2 tenant guard → C5
  4. syncVerify tenant copyMigration authority → C5
  5. syncActivate and update directoryMigration authority → C5

11Test isolation where shortcuts usually hide

Create a fixture with T7 and T8 both owning invoice 17 and customer 4. Exercise it through real cache keys, pooled connections, background jobs, object access and operator tooling. Test forged tenant headers, missing SQL scope, retained connection context and canceled/revoked exports. A helper-unit test cannot cover the full path.

Measure tenant/cohort latency, database time, scanned/output bytes, active jobs, queue age, denied scope violations, migration lag and epoch mismatches. Control metric-label cardinality while preserving authorized investigation paths for one tenant. Global averages should not hide a starved customer.

For the ordinary backup tier, take at least daily recoverable backups and measure the four-hour restore goal on a 1 GB tenant. Restore a tenant in a separate environment, validate scope and import deliberately; restoring the pooled database in place overwrites other customers. Deletion covers rows, derived indexes, caches, exports and documented backup treatment. Backups must retain placement fences and replay outcomes, not merely invoice content.

Roll schema changes cell by cell with compatible readers/writers and stop on failures. Drill a paused write during migration, reverse the ordering, then crash the coordinator during the freeze, copy and activation stages. Compare destination results and current authority before reopening traffic. The next economic decision is whether observed tenant skew or policy requirements justify a dedicated cell, not whether a customer carries an “enterprise” label.

12Check the design against its requirements

Before closing, check the final design against the agreed requirements. FR means functional requirement and NFR means non-functional requirement; the numbers refer to the lists above. These are proposed validation checks, not test results.

Requirement Mechanism in the final design Validation and remaining limit
FR 1–3; NFR 3 Trusted tenant/action context, composite identities and repeated export/download authorization protect scope. Use T7 and T8 with invoice 17 through SQL, cache, pooled connections, jobs and files; revoke an exporter before result access.
FR 2; NFR 6 Invoice and replay result commit together; read-your-write requests use an up-to-date path. Lose a create reply and retry; require the same invoice, no stale missing result and no cross-tenant relationship.
FR 4; NFR 1, 2, 4 Fair work budgets, interactive capacity and cells address expensive exports and skew. Load-test a noisy tenant alongside ordinary reads, measuring tenant p95 and per-cell availability. The average cell calculation does not prove balanced placement.
FR 5; NFR 6 Source freeze, writer drain, verified copy and one destination activation transfer authority. Race writes on both sides of the freeze and crash the coordinator. Require one history; the chosen design accepts a maintenance pause.
FR 5; NFR 5 Replicated commits, scoped backup restore and deletion inventory cover different loss modes. Lose a database node and restore a sample 1 GB tenant from backup elsewhere. Measure the separate 24-hour recovery-point/four-hour recovery-time targets and verify other tenants stay intact.

13Rapid revision

Rehearse the numbered functional requirements and non-functional targets first. Use this table to recall the mechanisms, then close with the requirements check above.

Remember: Same invoice number; different tenant ownership.

Prompt Recall
What establishes tenant scope? Verify membership and permission for the action; a URL or header alone proves neither
What identifies invoice 17? Tenant plus local ID, included in related records, cache keys and jobs
What does RLS add? Another database check, if roles cannot bypass it and each transaction sets the right tenant
Why cells? Limit how many tenants one failure affects and add capacity; shared services can still fail
What protects ordinary reads from exports? Limit expensive work, schedule tenants fairly and reserve capacity for interactive requests
What transfers write ownership? Stop source writes, finish active writes, copy and verify, then enable only the destination
What survives lost replies? Copy saved retry results with tenant data, so the same request returns its earlier result
What does a signed URL grant? Time-limited access to anyone holding it, unless the server also checks current user permission

Close with: “I pool ordinary tenants while enforcing trusted scope end to end. Fair budgets protect shared resources; cells and dedicated placement follow measured needs. During a move, every writer respects the source freeze, and the destination activates only after a verified copy. I accept a maintenance pause to keep one authoritative tenant history.”

Practise the interview questions

Say your answer aloud before opening the model answer. Then answer the follow-up and compare the reasoning.

Foundation · Question 1

Why is tenant ID in the URL insufficient?

Reveal a model answer

It expresses the requested organization, not membership or permission. Authentication establishes the actor; authorization verifies the active tenant and action. Trusted scope then travels through database queries, caches, jobs and files. An unchecked forwarded tenant header would let a caller choose another customer’s data.

What the answer must demonstrate: It expresses the requested organization, not membership or permission.

Foundation · Question 2

What does row-level security add?

Reveal a model answer

It lets the database enforce row-access policy as defense in depth. Its assumptions include a constrained application role and initialized transaction-local tenant context. Table owners, bypass privileges or stale pooled-session context can undermine those assumptions. It complements rather than replaces application authorization.

What the answer must demonstrate: It lets the database enforce row-access policy as defense in depth.

Applied · Question 3

Why does request-count limiting miss export overload?

Reveal a model answer

A million-row export can consume roughly 100 CPU-seconds in the example, equivalent to 50,000 ordinary reads. Counting it as one request hides database work and output load. Limit active exports, query duration, scanned/output bytes and connections, with fair tenant scheduling and reserved interactive capacity.

What the answer must demonstrate: A million-row export can consume roughly 100 CPU-seconds in the example, equivalent to 50,000 ordinary reads.

Applied · Question 4

When would you give a tenant dedicated placement?

Reveal a model answer

Use measured sustained demand or explicit region, key, recovery and administration constraints. Ordinary tenants can pool economically in cells. Separate schemas mainly organize namespaces; dedicated compute is needed to isolate certain resource contention. Every placement still requires logical authorization at its access paths.

What the answer must demonstrate: Use measured sustained demand or explicit region, key, recovery and administration constraints.

Applied · Question 5

What if an invoice write overlaps cutover?

Reveal a model answer

The chosen migration pauses tenant writes at a boundary shared by every mutation. It waits for admitted writes to commit or abort before copying the stable data. A writer that completed first is copied with its replay result; one arriving after the freeze is rejected and retries at the new placement. Background writers must follow the same rule.

What the answer must demonstrate: The chosen migration pauses tenant writes at a boundary shared by every mutation.

Follow-up · Question 6

Activation of C5 times out. May you reopen C2?

Reveal a model answer

No. A timeout does not prove C5 accepted no writes. Keep C2 frozen, inspect durable migration progress and recover or finish the destination transition. Once C5 has new writes, returning to C2 needs a controlled transfer of those changes. The main design accepts a maintenance window rather than simultaneous ambiguous ownership.

What the answer must demonstrate: No. A timeout does not prove C5 accepted no writes.

Applied · Question 7

Does a signed download URL enforce current user identity?

Reveal a model answer

The selected design uses an authenticated gateway that checks current tenant membership and permission on a new download request. An ordinary presigned URL is an alternative bearer capability: possession may allow access until expiry even after revocation. Use that alternative only if its expiry-bound behavior meets the contract.

What the answer must demonstrate: The selected design uses an authenticated gateway that checks current tenant membership and permission on a new download request.

Follow-up · Question 8

How do you restore one tenant from a pooled backup?

Reveal a model answer

Restore into a separate recovery environment, verify tenant scope and import only intended records through a controlled ownership plan. Include replay outcomes, outbox and placement-control state, then rebuild derived views. Restoring the pooled database in place would overwrite other customers.

What the answer must demonstrate: Restore into a separate recovery environment, verify tenant scope and import only intended records through a controlled ownership plan.

Blank-page exercise · 45 minutes

Build the answer yourself

Serve T7 and T8 with matching invoice IDs, protect reads from export overload, then move T7 from C2 to C5.

  • Agree the numbered functional requirements and non-functional targets, including tenancy, exports, isolation, skew, recovery and maintenance acceptance.
  • Estimate skew and export cost.
  • Show the pooled transaction/cache/job flow.
  • Choose fair budgets and placement.
  • Prove both writer-versus-freeze orders.
  • Validate invoice/export behavior, isolation, latency, recovery and one-writer cutover against the numbered requirements; state restore, grant and coordinator limits.

Check that each component and design decision follows from your requirements and workload.

Recall the key ideas

Answer from memory before opening each card. Explain why the choice works and what it costs. Revisit missed cards tomorrow.

Design a multitenant SaaS platformT7 and T8 both have invoice 17. What must every access path check?Recall first, then reveal

Verify the caller may act for the requested tenant. Keep that tenant in database relationships, cache keys, jobs, files and operator checks; the invoice number alone is insufficient.

Same invoice number; different tenant ownership.

Return to lesson
Design a multitenant SaaS platformHow does a maintenance move avoid two writable copies of one tenant?Recall first, then reveal

Stop source writes, finish admitted work, copy and verify the data, then enable only the destination. The move accepts a maintenance pause.

Stop writes → drain → copy and verify → enable destination.

Return to lesson
Design a multitenant SaaS platformWhen should a tenant receive dedicated infrastructure?Recall first, then reveal

When measured resource use disrupts others, or a specific storage location or administrative requirement justifies the cost.

Isolate for a concrete constraint.

Return to lesson

Final revision

Summary and interview notes

Check tenant permission in queries, caches, jobs and files. Limit each tenant’s work to protect others; choose shared or dedicated placement for measured needs. During a move, stop source writes before enabling the verified destination.

Remember these points

  • Agree the numbered functional requirements and non-functional targets before designing components; validate the final design against them.
  • Verify the requested tenant before deriving trusted context.
  • Use composite identities through every handoff.
  • Budget expensive work separately from request counts.
  • Add cells and dedicated capacity for measured constraints.
  • Commit one migration decision after source freeze and destination validation.

Interview tips

  • Reuse invoice 17 in two tenants to expose missing scope.
  • Make the old writer’s rejection explicit during cutover.

Important qualifications

  • A cell does not remove shared-control dependencies.
  • Stronger download revocation needs an online enforcement boundary.

Continue after the core interview

Explore the advanced version

The advanced lesson keeps the full detailed design. Use these sections when you want to examine the stronger requirements and failure cases.

Technical references

Practice marks stay in this browser.