MultiTenant solution means multiple tenants or customers all using the same service or sharing all the resources in some way. In a B2B application tenants are the organization who use the system. In a B2C application tenants may represent individual users using the application .
It doesn't mean every single aspect of the resources to be shared with every tenant . Sharing might include some level of resources like Code and Binaries , Databases , Infrastructure etc. At times tenants may come up with specific requirements/compliance for sharing resources , data with other tenants.
It is necessary to balance tenants' requirements, level of efficiency in cost, performance, and compliance with the degree to which we share resources.
Tenant isolation models
Level of tenant resource isolation or sharing is not a binary decision and there is a spectrum of options available from fully isolated (shared nothing) to fully shared(shared everything).
Fully isolated deployment (Shared nothing)
Each tenant will be assigned a dedicated server and database, as shown in the above diagram. Each individual deployment is called stamps because we are stamping up an instance for each tenant. Since we are not sharing any of the resources it consumes the highest resource cost. If tenants are not as busy as expected, the resources will be idle.
Vertically partitioned deployment (Partially shared)
In this model few tenants share stamps with some tenants , while performance/compliance sensitive tenants will get dedicated instances.
Horizontally partitioned deployment (Partially shared)
In this mode all the tenants share some of the resources with all the other tenants while a certain part of the resources is dedicated to individual tenants. In order to select this model, we must be very clear about which resources are shared and which are dedicated.
Fully multitenant system(Share everything mode)
In this model every tenant accesses the same web server and the same database. There is an enormous cost advantage in this model and it's easy to manage. Make sure that tenants cannot accidentally access each other's data.
(To Be Continued…….)