Multitenancy is an architectural approach in which one software solution serves multiple customers, organizations or other defined groups called tenants. Those tenants may share computing resources, an application deployment, storage or operational services while maintaining appropriate boundaries for data, configuration and access. It does not necessarily mean that every tenant uses the same physical server or database.
Software-as-a-service products often use multitenancy to serve customers efficiently, but resource sharing creates responsibilities. A system must know which tenant a request belongs to, restrict access accordingly, monitor how tenants affect each other and offer recovery paths when a shared component fails. Good architecture balances isolation, cost, performance and maintainability instead of treating maximum sharing as the only goal.
Distinguish tenants, users and deployments
A tenant might represent a company that subscribes to a business application. That company may have hundreds of users with distinct roles. The tenant is not equivalent to each user, and one person might belong to more than one tenant under separate permissions. A service may deploy one application instance for many tenants or provide dedicated instances for selected customers.
The Azure Architecture Center’s multitenant introduction explains that both business-to-business SaaS products and certain consumer services can be multitenant. It separates the concept of multiple tenants from an assumption that all infrastructure must be shared. Defining the tenant in the actual business model is the first design decision.
For a fictional booking service, a tenant could be a clinic, while its users are staff and administrators. One clinic should not see another clinic’s appointment records simply because both use the same application. The design must also define whether a regional subsidiary is its own tenant or belongs to a larger organization. Those decisions affect reporting and authorization.
Compare pooled, siloed and hybrid resource designs
In a pooled approach, tenant workloads share application and perhaps data resources. This can improve utilization and reduce per-tenant provisioning work, but isolation becomes more dependent on software logic, permissions and resource controls. A failed query or noisy workload can affect unrelated customers if shared capacity is not protected.
In a silo model, some or all tenant resources are dedicated. Dedicated databases or deployments can simplify certain isolation boundaries and capacity planning but create more provisioning, monitoring and upgrade work. A hybrid approach might use shared application processes with separate databases or reserve dedicated infrastructure for tenants with unusual obligations.
Amazon Web Services’ SaaS Lens discusses pooled isolation, the noisy-neighbor effect, tenant-specific cost tracking and the greater blast radius of shared failures. Amazon is the vendor; AWS is the cloud services and certification brand. These design issues are not unique to Amazon’s services.
Microsoft’s tenancy model guidance treats isolation as a spectrum. A provider can choose separate boundaries for compute, data and networking. Pick arrangements that match actual customers and operational constraints rather than assuming multitenancy guarantees either cost savings or maximum security.
Design tenant identity and server-side authorization
Every incoming request needs a reliable tenant context. A browser may indicate which organization the user is working with, but the server must establish that the authenticated user is actually authorized for that tenant and the requested operation. A tenant identifier supplied through a URL or HTTP header is not, by itself, proof of permission.
Enforce authorization on each protected resource. An endpoint such as /tenants/42/invoices/7 must not return an invoice merely because the caller knows the identifiers. The application needs a checked relationship between the caller, tenant and invoice. Administrators with access to several tenants require explicit rules about which tenant’s data is being accessed.
Background jobs and message consumers need the same discipline. A queued task may outlive a user’s browser session; it should carry trusted authorization context or securely reestablish that context rather than fall back to an unrestricted service identity. Audit operations that cross tenant boundaries and make privileged support access deliberate, documented and time-bound.
Store tenant data with clear boundaries
Common patterns include a shared database with tenant identifiers, separate schemas, separate databases or entire dedicated deployments. Each has operational and security trade-offs. A shared table is often convenient for many small tenants, but every relevant query and mutation must respect authorization. Separate databases provide another boundary but increase migration and backup coordination.
The Azure Architecture Center’s storage guidance discusses shared databases and dedicated tenant databases, including risks of using individual tables for every tenant at large scale. Mixing patterns can be appropriate when customers have different residency, performance or isolation requirements.
For a shared relational table, a server-side query might use a tenant ID established from a verified identity context:
SELECT invoice_id, amount
FROM invoices
WHERE tenant_id = $1
AND invoice_id = $2;
The placeholders represent bound parameters, not strings concatenated into SQL. The tenant value must come from a server-validated membership check; allowing a caller to choose any $1 would defeat the intended boundary. This query is only one defense, not a complete tenancy security system. Apply protection to writes, joins, exports, search indexes, object storage and caches as well.
PostgreSQL also supports row-level security (RLS) policies that restrict access to rows under supported roles and expressions. RLS can provide useful defense in depth, but roles with BYPASSRLS and table owners under usual conditions can bypass the policies. An application using a privileged connection must not claim that enabling a policy automatically enforces every tenant boundary.
Prevent leakage through caches, files and logs
Even a correctly filtered database query may be followed by a broken cache lookup. A cache key based only on invoice_id may collide across tenants if identifiers are not globally unique. Include tenant scope where appropriate and define whether cache entries contain information that should be separately encrypted or access-restricted.
Files, object-storage prefixes, search indexes, analytics tables and backups require the same tenant-context design. A cross-tenant data export can expose information even if the main application screens appear safe. Logs can accidentally include personal records from several organizations and should have controlled retention and access.
Test tenant switching, support accounts and failure paths with at least two synthetic tenants. Verify that requests are refused when a legitimate user from tenant A attempts to read or modify tenant B’s records. Repeat checks on background jobs, file downloads and reporting endpoints, not just the main user interface.
Manage noisy neighbors, quotas and operational failures
When tenants share compute or databases, one customer’s heavy workload may increase latency or consume capacity needed by others. The system may need request quotas, concurrency limits, workload priorities, resource reservations or separate queues. A tenant exceeding an agreed quota should receive understandable behavior rather than silently degrade unrelated customers’ work.
Collect tenant-aware telemetry for throughput, errors, resource use and cost. Measure with appropriate privacy protections and avoid charging customers based on ambiguous shared-resource estimates. Scaling application instances without considering database connection limits can worsen an outage rather than resolve it.
Availability is not guaranteed by shared infrastructure. A failure in a pooled control plane or shared database can affect every tenant. Conversely, a dedicated deployment may isolate some failures but require more complex maintenance. Define recovery objectives, test backups and establish ways to identify which tenants a change or incident affects.
Support upgrades, onboarding and tenant migration
Onboarding should create the correct tenant identity, permissions, data partitions, policies and any dedicated resources. Make provisioning idempotent so retries do not create conflicting tenants or duplicate billing. Validate that a newly created tenant cannot see sample records belonging to another one.
Schema changes can affect many customers in one release. Plan backward-compatible migrations, verify application behavior with representative tenants and avoid assumptions that a code rollback can undo a destructive data change. A hybrid design may require migrating a tenant from a shared database to a dedicated one, including data completeness checks and an agreed transition window.
Retirement matters as much as onboarding. Define export, retention, deletion and cancellation procedures according to contracts and law. An organization may need proof that data was transferred correctly before its old tenant resources are retired. A release manifest should record affected tenants and protected metadata rather than rely on a vague claim of successful deployment.
Choose multitenancy based on documented requirements
Use multitenancy when the benefits of shared operations justify its complexity. A small internal service with one business owner may not need sophisticated tenancy boundaries. A commercial SaaS platform serving many organizations likely needs explicit tenant identity, access policy, data isolation, metering and per-tenant support from its earliest design.
For broader context, the backend technology overview explains runtimes and databases that may participate in a SaaS architecture. Those technology choices do not determine the tenancy model automatically.
A reliable multitenant design keeps each customer’s information and service expectations within explicitly tested boundaries. It can share resources where sensible and isolate them where necessary, while documenting cost, failure and regulatory trade-offs. The central question is not how many tenants fit on one server, but whether the organization can serve each tenant correctly and responsibly.