Recent from talks
Nothing was collected or created yet.
Multitenancy
View on WikipediaSoftware multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such manner are "shared" (rather than "dedicated" or "isolated"). A tenant is a group of users who share a common access with specific privileges to the software instance. With a multitenant architecture, a software application is designed to provide every tenant a dedicated share of the instance—including its data, configuration, user management, tenant individual functionality and non-functional properties. Multitenancy contrasts with multi-instance architectures, where separate software instances operate on behalf of different tenants.[1]
Some commentators regard multitenancy as an important feature of cloud computing.[2][3]
Adoption
[edit]History of multitenant applications
[edit]Multitenant applications have evolved from—and combine some characteristics of—three types of services:
- Timesharing: From the 1960s companies rented space and processing power on mainframe computers (time-sharing) to reduce computing expenses. Often they also reused existing applications, with simply a separate entry field on the logon screen to specify a customer-account ID. On the basis of this ID, the mainframe's accountants could charge the individual customers for CPU, memory and disk/tape usage actually incurred.
- Hosted applications: From the 1990s traditional application service providers (ASPs) hosted (then-existing) applications on behalf of their customers. Depending on the limitation of the underlying application, ASPs were forced to host applications on separate machines (if multiple instances of the applications could not be executed in the same physical machine) or as separate processes. Multitenant applications represent a more mature architecture[4] which enables a similar service with lower operational cost.
- Web applications: Popular consumer-oriented web applications (such as Hotmail) developed with a single application instance serving all customers. Multitenant applications represent a natural evolution from this model, offering additional customization to groups of users within (say) the same client organization.
Differentiation from virtualization
[edit]In a multitenancy environment, multiple customers share the same application, running on the same operating system, on the same hardware, with the same data-storage mechanism. The distinction between the customers is achieved during application design, thus customers do not share or see each other's data. Compare this with virtualization where components are transformed, enabling each customer application to appear to run on a separate virtual machine.[5]
Competitive differentiation
[edit]Some companies actively promote the principle of multitenancy and use it as a source of competitive differentiation. The use of multitenancy is increasing day by day.[6]
Economics of multitenancy
[edit]Cost savings
[edit]Multitenancy allows for cost savings over and above the basic economies of scale achievable from consolidating IT resources into a single operation.[7] An application instance usually incurs a certain amount of memory and processing overhead which can be substantial when multiplied by many customers, especially if the customers are small. Multitenancy reduces this overhead by spreading it over many customers. Further cost savings may come from licensing costs of the underlying software (such as operating systems and database management systems). Put crudely, if you can run everything on a single software instance, you only have to buy one software license. The cost savings can be eclipsed by the difficulty of scaling the single instance as demand grows - increasing the performance of the instance on a single server can only be done by buying faster hardware, such as fast CPUs, more memory, and faster disk systems, and typically these costs grow faster than if the load was split between multiple servers with roughly the same aggregate capacity.[citation needed] In addition, development of multitenant systems[8] is more complex, and security testing is more stringent because multiple customers' data is being commingled.
Complexity
[edit]Because of the additional customization complexity and the need to maintain per-tenant metadata, multitenant applications require a larger development effort. Considerations such as vector-based data sequencing, encryptable algorithm infrastructure, and virtualized control interfaces, must be taken into account.[9]
Release management
[edit]Multitenancy simplifies the release management process. In a traditional release management process, packages containing code and database changes are distributed to client desktop and/or server machines; in the single-instance case, this would be one server machine per customer. These packages then have to be installed on each individual machine. With the multitenant model, the package typically only needs to be installed on a single server. This greatly simplifies the release management process, and the scale is no longer dependent on the number of customers.
At the same time, multitenancy increases the risks and impacts inherent in applying a new release version. As there is a single software instance serving multiple tenants, an update on this instance may cause downtime for all tenants even if the update is requested and useful for only one tenant. Also, some bugs and issues resulted from applying the new release could manifest in other tenants' personalized view of the application. Because of possible downtime, the moment of applying the release may be restricted depending on time usage schedule of more than one tenant.
Best practices
[edit]According to Marc Brooker, in a multi tenant architecture, unrelated and uncorrelated workloads should be grouped together. That's because mixing different workloads, with different needs and patterns, hide the patterns of each workload. Grouping workloads reduces the peak-to-average ratio of the overall system; individual workloads can utilize more resources during peak times without significantly increasing the overall cost structure of the system and subsequently helps you to achieve more cost efficiency. Note that multiple workloads from the same application, customer or industry, tend to behave as a single workload. [10]
Requirements
[edit]Customization
[edit]Multitenant applications are typically required to provide a high degree of customization to support each target organization's needs. Customization typically includes the following aspects:
- Branding: allowing each organization to customize the look-and-feel of the application to match their corporate branding (often referred to as a distinct "skin").
- Workflow: accommodating differences in workflow to be used by a wide range of potential customers.
- Extensions to the data model: supporting an extensible data model to give customers the ability to customize the data elements managed by the application to meet their specific needs.
- Access control: letting each client organization independently customize access rights and restrictions for each user.
Quality of service
[edit]Multitenant applications are expected to provide adequate security, robustness and performance[11] between multiple tenants which is provided by the layers below the application in case of multi-instance applications.
Virtualization
[edit]The costs of redesigning applications for multitenancy can be significant, especially for software vendors who continue to offer an on-premises single tenant version of their product. They end up being forced to support two distinct products with all the resulting costs.
An increasingly viable alternative route to multitenancy that eliminates the need for significant architectural change is to use virtualization technology to host multiple isolated instances of an application on one or more servers. Indeed, when applications are repackaged as virtual appliances the same appliance image can be deployed in ISV hosted, on-premises or trusted-third party locations and even migrated from one deployment site to another over time.
References
[edit]- ^ Krebs, Rouven (2012). "Architectural Concerns in Multi-tenant SaaS Applications" (PDF). Proceedings of the 2nd International Conference on Cloud Computing and Services Science (CLOSER 2012). Conference on Cloud Computing and Services Science. SciTePress. Archived from the original (PDF) on 21 February 2015. Retrieved 21 February 2015.
- ^
Wainewright, Phil (30 October 2010). "Defining the true meaning of cloud". ZDNet. CBS Interactive. Retrieved 17 March 2016.
Multi-tenancy. Sharing a single, pooled, operational instance of the entire top-to-bottom infrastructure is more than simply a vendor convenience; it's the only way to really achieve cloud scale.
- ^
Wilder, Bill (2012). Cloud Architecture Patterns: Using Microsoft amit. O'Reilly Media, Inc. p. 78. ISBN 9781449357993.
In the cloud, multitenant services are standard: data services, DNS services, hardware for virtual machines, load balancers, identity management, and so forth.
- ^ What Is The SaaS Architecture Maturity Model? Forbes 20 November 2019
- ^ [1] The silly debate over multitenancy
- ^ Software as a service: The next big thing ComputerWorld 23 March 2006
- ^ "Web-to-Print Technology, Recuce Costs, Increase Sales, Integration with Salesforce and Metrix". Presscentric.com. Retrieved 20 January 2014.
- ^ "Building SaaS App with Codeigniter MVC". Computer Technology News Blog. Retrieved 5 May 2016.
- ^ Aulbach, S (2011). "Extensibility and Data Sharing in evolving multi-tenant databases". 2011 IEEE 27th International Conference on Data Engineering. pp. 99–110. doi:10.1109/ICDE.2011.5767872. ISBN 978-1-4244-8959-6. S2CID 17242970.
- ^ Building Multi-Tenant SaaS Architectures. O'Reilly Media. 2024. ISBN 9781098140601.
- ^ Zeng, Jiaan (2014). Multi-Tenant Fair Share in NoSQL Data Stores. 2014 IEEE International Conference on Cluster Computing (CLUSTER). IEEE. doi:10.1109/CLUSTER.2014.6968761.
Multitenancy
View on GrokipediaFundamentals
Definition and Core Concepts
Multitenancy is a software architecture principle in which a single instance of an application serves multiple customers, referred to as tenants, by sharing the underlying infrastructure while ensuring logical separation of each tenant's data and configurations.[1] This approach allows multiple users or organizations to access the same software deployment without interfering with one another, optimizing the use of shared resources such as compute power, storage, and networking capabilities.[2] At its core, multitenancy relies on three key principles: resource sharing, data isolation, and scalability. Resource sharing enables efficient pooling of hardware and software assets across tenants, reducing redundancy and allowing dynamic allocation based on demand. Logical isolation ensures that each tenant's data, customizations, and access controls remain segregated, typically through techniques like tenant identifiers in databases or namespace partitioning, preventing unauthorized access or data leakage.[6] Scalability is achieved by leveraging pooled resources to handle varying workloads from multiple tenants simultaneously, enabling the system to grow horizontally without proportional increases in infrastructure.[2] This architecture provides high-level benefits, including improved efficiency in resource utilization by minimizing idle capacity and lowering overall operational costs through shared maintenance and updates.[1] Prominent real-world examples include Salesforce, where a single platform instance supports millions of organizations with isolated CRM data and workflows, and Google Workspace, which delivers collaborative tools like email and documents to diverse enterprises via a shared backend while maintaining per-tenant privacy.[7][8]Types of Multitenancy
Multitenancy architectures are typically categorized by the degree of resource sharing at the database level, ranging from fully shared environments to fully isolated ones, each offering distinct balances of efficiency and security. These models primarily focus on how tenant data is stored and isolated within databases, influencing scalability, maintenance, and compliance requirements.[9][10] In the shared database, shared schema model, all tenants' data resides in a single database instance using the same schema, with isolation achieved at the row level through mechanisms like tenant identifiers to filter data during queries. This approach enables high resource utilization by pooling all tenants into one set of tables, often appending a tenant ID column to each relevant table. However, certain system-wide tables, known as global tables, may not include a tenant_id column as they are shared across all tenants for elements that apply uniformly, such as subscription plans and roles. For example, a plans table might be defined as:CREATE TABLE plans (
id UUID PRIMARY KEY,
name TEXT NOT NULL,
price_monthly DECIMAL(10,2),
features JSONB,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE plans (
id UUID PRIMARY KEY,
name TEXT NOT NULL,
price_monthly DECIMAL(10,2),
features JSONB,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE roles (
id UUID PRIMARY KEY,
name TEXT NOT NULL,
permissions JSONB
);
CREATE TABLE roles (
id UUID PRIMARY KEY,
name TEXT NOT NULL,
permissions JSONB
);
Historical Development and Adoption
Evolution of Multitenant Architectures
The roots of multitenant architectures lie in the time-sharing systems of the 1960s, which enabled multiple users to access a single mainframe computer concurrently through interactive terminals, optimizing resource utilization in an era of expensive hardware. These systems represented an early form of resource sharing among isolated user sessions, foreshadowing modern multitenancy by allowing efficient multiplexing of compute power without dedicated machines per user. A landmark implementation was the Compatible Time-Sharing System (CTSS), developed at MIT and first demonstrated in November 1961 on a modified IBM 709 mainframe, supporting up to 30 simultaneous users with features like virtual memory and command-line interfaces.[16][17][18] The 1990s and early 2000s brought multitenancy into the realm of networked applications with the advent of Application Service Providers (ASPs), which hosted software on centralized servers and delivered it to multiple clients via the internet, reducing the need for on-premises installations. ASPs typically employed shared infrastructure to serve diverse customers, marking a shift from single-tenant deployments to more economical, subscription-based models, though often with limited customization. This era culminated in the launch of Salesforce in 1999, which introduced a pioneering multitenant CRM platform built on a shared, metadata-driven architecture that allowed thousands of organizations to operate on the same instance while ensuring data isolation through tenant-specific configurations.[19] From the 2010s onward, the proliferation of cloud-native platforms accelerated multitenant evolution, with infrastructure-as-a-service (IaaS) and platform-as-a-service (PaaS) providers designing systems to scale for big data and distributed workloads. Amazon Web Services (AWS) exemplified this by introducing multi-account strategies post-2010, starting with Consolidated Billing in 2010 to aggregate costs across accounts and evolving into AWS Organizations in 2017 for policy-based governance and isolation in multi-tenant environments. These advancements enabled hyperscale resource sharing, where underlying infrastructure like virtual machines and storage pools served numerous tenants dynamically, addressing the demands of explosive data growth.[20][21] By the 2020s, up to 2025, multitenant architectures have increasingly incorporated serverless computing, edge processing, and AI-driven orchestration to enhance efficiency and responsiveness. Serverless platforms like AWS Lambda have advanced post-2020 multitenancy by executing tenant-specific functions in a shared runtime with noise isolation techniques, eliminating server management while scaling automatically for variable loads. Integration with edge computing, such as Lambda@Edge, extends this to low-latency scenarios like content delivery networks, and AI tools for tenant management—exemplified by AWS's agentic AI frameworks—automate provisioning, monitoring, and optimization across tenants to handle complex, dynamic workloads.[22][23]Key Adoption Drivers and Trends
The primary drivers for multitenancy adoption in software-as-a-service (SaaS) platforms include significant cost reductions through shared infrastructure and resources, enabling providers to lower operational expenses by 30-60% compared to single-tenant models.[24] This efficiency arises from pooling hardware, maintenance, and upgrades across multiple tenants, allowing SaaS companies to offer competitive pricing while maintaining profitability. Additionally, multitenancy facilitates rapid scalability to accommodate global user growth, as seen in platforms that dynamically allocate resources without dedicated per-tenant infrastructure. Regulatory compliance, particularly with frameworks like the General Data Protection Regulation (GDPR) implemented in 2018, further propels adoption by necessitating robust data isolation and handling mechanisms in shared environments to ensure tenant privacy and sovereignty.[25] Industry trends underscore a marked shift toward multitenant cloud architectures, with 70% of organizations embracing hybrid cloud strategies as of 2025, according to Flexera's State of the Cloud Report, projected to reach 90% by 2027 per Gartner, driven by the need for flexible, scalable services in B2B SaaS ecosystems.[26][27] This transition is fueled by escalating public cloud spending, projected to reach $723.4 billion in 2025, reflecting widespread reliance on multitenant models for efficiency and innovation. Emerging areas like multi-tenant AI platforms have gained traction post-2022, exemplified by Azure OpenAI Service, which supports shared model deployments across tenants while enforcing isolation for enterprise-scale applications. In B2B SaaS, these trends emphasize vertical solutions and AI integration, with multitenancy enabling seamless expansion into specialized markets without proportional infrastructure costs.[27][28] Competitive differentiation through multitenancy allows providers to accelerate feature rollouts and updates across all tenants simultaneously, outpacing single-tenant competitors in responsiveness and market agility. A notable example is Zoom's scaling during the 2020 pandemic, where its multitenant architecture on AWS services like DynamoDB supported a surge from 10 million to over 300 million daily meeting participants in months, demonstrating real-time global elasticity. Modern trends also address gaps in containerized environments, such as Kubernetes namespaces introduced post-2015, which enable logical partitioning for multi-team collaboration and resource quotas in shared clusters. Furthermore, zero-trust security models have become integral to multitenant setups since 2023, incorporating decentralized identity and continuous verification to mitigate risks in shared cloud infrastructures.[29][30][31][32]Architectural Models
Single-Tenant vs. Multi-Tenant Designs
In single-tenant architecture, each customer receives a dedicated instance of the software application, database, and supporting infrastructure, allowing for complete isolation and customization tailored to their specific needs.[1] This model provides tenants with full control over their environment, including the ability to modify configurations, apply proprietary security measures, and integrate custom features without impacting others.[33] It is particularly suitable for scenarios requiring stringent security and compliance, such as government applications or enterprises handling highly sensitive data.[33] In contrast, multi-tenant architecture involves multiple customers sharing a single instance of the application and infrastructure, with logical separation to ensure data privacy and operational independence.[34] This shared model leverages resource pooling to support scalability across tenants, though it introduces potential risks like "noisy neighbor" effects, where one tenant's high resource usage could indirectly affect others' performance.[1] Within multi-tenant designs, variations exist in how sharing occurs, as outlined in core types of multitenancy.[35] Key design trade-offs between the two models center on customization versus isolation. Single-tenant setups offer unlimited customization but at the expense of resource efficiency and higher management overhead, as each instance requires separate maintenance.[33] Multi-tenant approaches limit customization to shared components to maintain uniformity, while demanding robust isolation mechanisms to prevent cross-tenant interference, which can complicate architecture if not carefully engineered.[34] Choosing between single-tenant and multi-tenant designs depends on factors such as expected tenant count, data sensitivity, and regulatory requirements. For low tenant volumes or high-security needs, single-tenant is preferable to ensure dedicated resources and compliance.[33] With larger tenant bases or cost-sensitive operations, multi-tenant enables efficient scaling, provided isolation adequately addresses sensitivity concerns.[35] A hybrid approach, combining elements of both, has gained traction post-2020 for balancing flexibility and control in diverse workloads.[36] Representative examples illustrate these differences: traditional on-premise ERP systems, such as SAP implementations for individual enterprises, typically employ single-tenant designs to support bespoke configurations in controlled environments.[37] Conversely, cloud-based CRM platforms like Salesforce utilize multi-tenant architecture to serve thousands of organizations from a shared infrastructure, optimizing for rapid updates and broad scalability.[38]Data Isolation Techniques
In multi-tenant systems, data isolation techniques are essential to prevent unauthorized access between tenants while sharing infrastructure, ensuring compliance with security standards such as GDPR and HIPAA. These methods balance resource efficiency with robust separation, primarily through logical and physical approaches tailored to database and storage layers. Logical isolation leverages software mechanisms to segregate data within shared environments, whereas physical isolation employs dedicated hardware or instances for stricter boundaries.[10] Logical isolation commonly uses tenant identifiers (tenant IDs) embedded in data records to enforce separation at the application or database level. For instance, queries incorporate WHERE clauses filtering by tenant ID, such asSELECT * FROM users WHERE tenant_id = current_tenant(), preventing cross-tenant data exposure. Row-level security (RLS) extends this by applying database-enforced policies that automatically restrict row access based on user context, as implemented in PostgreSQL since version 9.5. In PostgreSQL, RLS policies like CREATE POLICY tenant_policy ON users USING (tenant_id = current_setting('app.current_tenant')) ensure tenants only retrieve their own data, centralizing isolation without application-layer modifications.[39] Similarly, CockroachDB's RLS, introduced in version 25.2 (2025), supports multi-tenant isolation by evaluating policies during query execution on shared tables, using session variables for tenant context.[40]
Physical isolation dedicates separate storage instances, such as individual databases or virtual machines (VMs), to each tenant, providing inherent separation without relying on software filters. This approach is prevalent in high-security scenarios, where tenants receive isolated VMs on cloud platforms like AWS EC2, ensuring no shared memory or disk access. In databases, separate schemas or instances per tenant achieve similar effects, as seen in FoundationDB's Record Layer, which assigns contiguous key ranges to tenants for logical yet physically bounded storage. While more resource-intensive, physical isolation minimizes risks from misconfigurations in shared environments.
Access controls in multi-tenant systems integrate role-based access control (RBAC) and attribute-based access control (ABAC) to manage permissions dynamically. RBAC assigns roles scoped to tenants, such as "tenant-admin" restricting actions to tenant-specific resources, as outlined in AWS Verified Permissions for multi-tenant APIs.[41] ABAC enhances this by evaluating attributes like user identity, tenant affiliation, and data sensitivity, enabling fine-grained policies such as denying access if user.tenant != resource.tenant.[42] Encryption complements these by securing data at rest and in transit; tenant-specific keys, managed via services like AWS KMS, ensure that even if data is co-located, decryption requires tenant-validated credentials.
Challenges in data isolation include cross-tenant query risks, where flawed filters might leak data, and scalability issues in shared storage. Mitigations involve schema separation, where each tenant uses a distinct namespace to avoid query overlaps, and database sharding to distribute tenant data across shards. For example, CockroachDB's multi-tenant features, evolving since version 21.1 (2021), use sharding with tenant-aware partitioning to isolate workloads while maintaining distributed SQL consistency.[43] Sharding strategies, like tenant-ID-based horizontal partitioning in PostgreSQL extensions such as Citus, further prevent interference by routing queries to tenant-specific nodes.[44]
Modern techniques incorporate zero-trust models, assuming no inherent trust between tenants and verifying every access request continuously. In zero-trust architectures for multi-tenant clouds, tenant isolation is enforced via microsegmentation and identity verification at the network and data layers, as detailed in analyses of cloud environments.[32] Additionally, AI-driven anomaly detection identifies isolation breaches by monitoring access patterns; tenant-aware deep learning models, such as those using capsule networks and LSTMs, detect deviations in SaaS networks by embedding tenant context into intrusion detection systems.[45] These methods proactively flag unusual cross-tenant activities, enhancing isolation beyond traditional rules-based approaches.[46]
