Multi-tenancy enables the client service providers to serve multiple clients by a single application instance, isolating each tenant’s data. The benefits of this method include increased utilization of available hardware resources and improved ease of maintenance and deployment. These results are in lower overall application costs.
In a multi-tenant architecture, a software application is designed virtually to partition data. Each tenant works in a virtual application instance in which some tenants may be divided into multiple subtenants, each having its own users. As the number of tenants increases, scalable architecture is needed.
The business logic layer provides security by the access control component which should be isolated from the offered services. The database layer stores the application data. To enforce scalability of the database layer a logical hierarchical representation of the tenants and subtenants, and making a mapping to the physical storage is followed.
The data access layer provides load balancing between the different data stores and stores the decision support for managing the data store. Tenants and subtenants in a multi-tenant organization can be structured hierarchically in the form of a tenant tree. At the top level of the tree is the SaaS provider, which is the root node of the tenant tree.
Various tenants using the applications are located at the next level and are the child nodes of the SaaS provider. All tenants share the same parent or root node. Some tenants may be even divided into multiple subtenants.
The representation of tenants is done by logical hierarchical representation. The data could be split as in the logical representation, by creating data stores for tenants or merging smaller databases. Small applications with a less number of tenants, can share a single data store. There are 3different models for load balancing.
'
In the monolithic model, all data is stored in a single data store. In the fully distributed model, every tenant and subtenant has its own data store. Whereas the hybrid model is a mixture of both monolithic and fully distributed models.
For new SaaS applications with a limited number of tenants, the service provider could use the monolithic model for storing data, and move to a fully distributed model or hybrid as the amount of data and the number of tenants increases. The monolithic model is easier to implement at a lower cost, as it requires only a single database instance. The fully distributed model is more expensive but it offers more scalability and flexibility.