Introduction
Multitenant is a software architecture principle in which a single instance of the application is capable of serving multiple clients or organizations (tenant or instance).
This model differs from architectures with multiple instances where each organization or client has its own installed instance of the application, since in a multitenant architecture the application can virtually partition its data and configuration so that each client has a virtual instance adapted to their requirements.
With the SaaS model, this architecture model is increasingly important because it allows us to optimize resources.
Each client of the service is considered a tenant. This allows elements of the application to be customized, such as interface colors, but the code itself is not customized.
Something important in this architecture is that a client is not necessarily a single user, it can be a group of users.
Advantages and disadvantages of a multitenant
Advantage
Reduction in infrastructure and maintenance costs, since the costs are distributed among all customers.
Easy upgrade, as only one instance needs to be upgraded.
Security of the information of each client, since it has a separate schema for each one.
Optimizes the use of server resources.
Disadvantages
It makes it difficult to develop specific features for a client.
Single point of failure: If the application has an error or crashes, it will fail for all clients.
Platform Multitenant Support
The Multitenant functionality in Platform is supported on two concepts:
Vertical: represents a specific product and project. Imagine the deployment of Platform on an organization that offers products in SaaS mode: In this case, we could have different verticals deployed on an instance, for example Vertical Smart Home, Vertical Waste Management,...
Tenant: represents a client to whom the organization serves its products, for example we could offer the Smart Home solution to Carrefour, Leroy Merlin,…
With Onesait Platform support with a single platform instance, we could serve multiple verticals and tenants.
The platform capabilities in terms of multitenant mode are reflected as follows:
Each Vertical has its own ConfigDB, that is to say, each Vertical can create its own platform concepts independently from the rest, that is, its ontologies, APIs, DataFlows, microservices, dashboards, ...
Each Tenant has its own RealTimeDB: so the data of each tenant is stored independently and is not mixed.
Users are general to the entire platform instance and can be associated with verticals and tenants.
All this is transparent to the user, meaning that the usability of the platform hardly changes - you only have to take into account a couple of points that we will explain later.