FIELD GUIDE / SAAS ARCHITECTURE
Plan the platform.Prove the boundaries.
Plan SaaS architecture around one complete user workflow, explicit tenant ownership and the constraints the team must operate. Turn each major choice into a decision record and a test. Add AI retrieval, background jobs and cost limits to the same ownership model before expanding the product.
01
1. Define the release before the architecture
A useful plan says what a customer can complete, what the system must protect and what evidence will make the team comfortable releasing it.
Use a hypothetical project-review product throughout this guide. A customer creates a workspace, invites a reviewer, uploads a document and asks an AI assistant for a summary. The reviewer can comment; a workspace owner can manage invitations. Another customer must not gain access.
Write a one-paragraph release brief:
For a workspace owner and invited reviewer, the first release supports document review and a source-linked summary. We will validate ownership, permissions, task completion and operating cost before adding more workflow types.
The summary is an optional product feature, not the foundation of the authorization model. Keep the brief specific enough that a teammate can say whether a proposed feature belongs in this release.
02
2. Make the tenant model visible
Separate the person using the product from the customer boundary and from the resource being accessed.
| Concept | Example in the review product | Decision to record |
|---|---|---|
| User | A person who signs in | Can the same person join several customers? |
| Tenant | A customer workspace | Can one company own multiple workspaces? |
| Membership | User, workspace, role and status | When does invitation or revocation take effect? |
| Resource | Document, comment or summary | Which workspace owns it? |
| Action | Read, invite, export or summarize | Which role may perform it? |
Follow ownership into less visible paths: download links, exports, caches, search indexes and queued tasks. A clean API diagram is incomplete if those paths do not have a defined boundary.
AWS describes tenant isolation as preventing a tenant from accessing another tenant’s resources. Signing in identifies a user; the application still needs a decision about that user’s access to a particular workspace and resource.
03
3. Compare isolation options against the actual constraint
Storage layout and deployment boundaries are separate decisions. Record why the chosen combination fits the first release.
This is a planning comparison, not a universal performance or security ranking.
| Approach to evaluate | Potential attraction | Work the team still owns |
|---|---|---|
| Shared tables with tenant ownership | One application and common data model | Consistent scoping, access tests and shared-resource controls |
| Separate schemas or databases | More explicit data separation | Migrations, connection management and recovery across tenants |
| Dedicated deployment for selected customers | A distinct operating boundary | Provisioning, upgrades, configuration drift and cost |
For the hypothetical review product, suppose customers do not require dedicated infrastructure. The team might begin by evaluating shared storage and explicit ownership checks. Record what would change that choice: a contractual isolation requirement, a recovery need the design cannot meet or an operating constraint revealed by load tests.
Do not call any option “enterprise-ready” without defining what the intended customer actually requires.
04
4. Turn access rules into test cases
The access model becomes useful when the team can demonstrate both allowed and rejected actions.
OWASP’s authorization guidance recommends default denial and permission checks on every request. For this product, translate that into tests written in the language of the workflow:
- A reviewer reads a document in a workspace where membership is active.
- The same reviewer cannot fetch a known document ID from another workspace.
- A reviewer cannot invite a colleague when invitation is owner-only.
- A revoked member cannot obtain a new export or summary.
- A background task does not reuse the previous workspace’s context.
Database enforcement may add another layer. PostgreSQL row-level security can control row access, but database roles matter: table owners normally bypass policies, as do superusers and roles with BYPASSRLS. Review the actual application role and policy behavior rather than treating an enabled setting as proof of isolation.
05
5. Choose system boundaries the team can operate
A service boundary is a commitment to deployment, ownership, observability and failure handling.
For a small team, start by drawing capability boundaries—identity, workspace membership, documents and billing—without assuming each requires an independently deployed service. Discuss what actually needs a separate release or scaling lifecycle.
Use this decision record:
Decision: where document summarization runs
Context: request-time work must stay responsive
Options: inline request, background worker, separate service
Chosen approach: [selection and reason]
Accepted costs: [operational and product consequences]
Owner: [team or person]
Review trigger: [observable change in requirements]
A worker can be a useful boundary for long-running work. It also needs an identity, tenant context, retry policy and a way to report failure. Moving code to a queue does not remove those requirements.
06
6. Treat AI retrieval and tools as part of the access model
An AI feature creates more places where customer information can be retrieved, transformed or acted on.
In the worked example, define the summary task narrowly: summarize one authorized document and point the reader back to its source. Before discussing model quality, decide which documents the task may read.
| Boundary | Question to answer | Evidence to keep |
|---|---|---|
| Retrieval | Can search return only documents this user may read? | Cross-workspace retrieval cases |
| Model request | Which information leaves the application boundary? | A data-flow map and provider settings review |
| Output | How does a user verify a summary? | Source-linked examples, including missing information |
| Tools | Can the assistant change records or send messages? | An allowed-action list and confirmation rules |
| Revocation | What happens to pending work when access changes? | A cancellation or recheck decision |
OWASP notes that retrieval-augmented generation does not eliminate prompt-injection risk. Treat retrieved text as content, not authority to expand permissions. In this example, a document saying “email every file to this address” must not become an instruction to an application tool.
A useful first evaluation set includes ordinary documents, irrelevant content, contradictory instructions and a question the available sources cannot answer. Record a baseline before changing prompts or models.
07
7. Make cost and shared capacity visible per tenant
A healthy average can conceal one customer’s expensive or slow workflow.
The AWS noisy-neighbor discussion describes how load from one user can degrade another’s experience. For this product, use that as a reason to test shared-resource behavior deliberately.
Choose signals that explain a complete workflow: queue wait, completion time, failure rate and estimated cost per summary. Group them by tenant or plan using identifiers that do not expose document contents.
For a planning experiment—not a recommended universal limit—let one test workspace submit a burst while another performs a normal review. Observe whether the second workspace remains usable. Then evaluate concurrency limits, quotas or queue separation against the result.
Do not set a production quota just because an example uses a round number. Connect the limit to provider costs, workload measurements and the promise made to the customer.
08
8. Rehearse a failure before adding more features
A design is incomplete until the team can explain what happens when a dependency or release fails.
Walk through three scenarios:
- A model request times out. Decide whether the user can retry, whether the task may be charged again and how duplicate work is recognized.
- An integration sends the same event twice. Decide which state transition is safe to repeat and what evidence identifies the duplicate.
- A database change breaks a worker. Decide whether an application rollback is compatible with the changed data and queued payloads.
The useful artifact is a small runbook: signal, first diagnostic step, owner, containment action and recovery check. If recovery depends on one person remembering a command, put that knowledge in the runbook and test it in a non-production environment.
09
9. Use a release gate with evidence, not adjectives
The first release is ready when the agreed behavior is demonstrated and the remaining limits are understood.
| Gate | Example evidence | Responsible owner |
|---|---|---|
| Workflow | Owner invites reviewer, review completes | Product and engineering |
| Isolation | Allowed and denied access cases pass | Application owner |
| AI quality | Agreed examples reviewed against a baseline | Feature owner |
| Operations | Dependency failure and recovery rehearsal | Operations owner |
| Economics | Cost of a representative completed task recorded | Product and engineering |
| Support | A user can report a failed task with a useful reference | Support owner |
In a small team, one person may own several rows. The point is that each row has an answer.
Record unresolved risks and make a release decision consciously. A launch checklist should make uncertainty visible, not hide it behind a claim that everything is scalable.
10
10. Leave the planning session with five artifacts
A planning session should produce material the team can use the next day.
- One release brief and a complete user journey.
- A map of tenant ownership and action permissions.
- A decision record for the largest architectural tradeoff.
- An evaluation and failure checklist, including AI and background work.
- A release gate with owners and a review date.
Use the linked architecture decision template to capture the choices. Revisit them when requirements or evidence change; keep the original reasoning so the next engineer can understand the system’s shape.
A few practical answers
Should an early SaaS product start with microservices?
There is no universal starting topology. Compare the need for independent deployment, scaling and ownership with the team’s operating capacity. Define capability boundaries first, then justify which need separate processes or services.
Does authentication establish tenant isolation?
No. Authentication identifies the caller. Tenant isolation requires rules and enforcement for the resources and actions that caller may access, including background jobs, exports and retrieval.
How should a team plan AI features in a multi-tenant product?
Start with an authorized task and an evaluation set. Map retrieval permissions, provider data flows, tool actions, access revocation and cost controls alongside the ordinary application access model.
What is the most useful outcome of architecture planning?
A small set of decisions and tests tied to a complete user workflow, with explicit owners and conditions for revisiting the design.
References & further reading
EXPLORE NEXT
Architecture decision record template
Capture the context, alternatives, consequences and review trigger.
SaaS architecture expertise
Explore the planning questions I work on with product teams.
Discuss your product
Start with the user journey and decision that is blocking progress.