Multi tenancy definition: A software architecture with a central installation of software that is being used by multiple tenants
Tenant definition: a group of users that access the same piece of software, but sees a different set of data
Each user has a separate environment
This is different than amulti-instance architecture because with multi-instance architectures each user has a unique piece of software installed on a different machine
Typically, multi tenancies are used when providing software as a service in an online environment in the cloud
Access to the cloud environment is given to users/clients via various price models
Each user/customer has access to their own data within the environment
What are the advantages?
Centralized maintenance
Pay-as-you-go pricing models
Fewer resources are needed to serve multiple customers
In DataFlex, multi tenancy is applied in two ways…
In WebApps: There are different datasets for different users, such as when setting up a software as a service environment
In Windows: There are usually multiple administrations that are maintained in a single application
There are three main strategies for developing multi-tenancies
Separate application : separate database
Least efficient (will not be discussed in detail during this series)
One shared application : separate databases
Each tenant has their own database within a single application
Better separation of data
Based on the user, the application switches between databases that have the same structure
Pros:
Physical separation of data
Simple backup & restore per tenant
Simple import/export of the data
Better scalability because databases can be spread over multiple servers
Cons:
SQL server licensing may be more expensive
Database structures are more complicated because they all need to be maintained
One shared application : one shared database
A single database that holds all the data for all of the customers
Data is constrained by some sort of tenant ID
A single table with all of the data that will have a tenant ID column that can be sorted on
Pros:
Better performance
Simpler database updates
Licensing costs
Cons:
Larger database size
Implementation is more tedious
Serious problem potential: a user sees another user’s data