Architecture – What exactly is a multi-tenant application

Architecturemultitenancyproduct

According to the definition available online, "Multi-tenancy is an architecture in which a single instance of a software application serves multiple customers". It means I have a Restaurant or School website and I provide access to different restaurant or school to use my application with their own data by using their credential I provide once they purchase my school management product. Like my website is like schoolmanagement.com and I provide different sub domains to different school clients like school1.schoolmanagement.com & school2.schoolmanagement.com but the code is the same behind both these subdomains. Both schools have different functionality or theme depending on their separate database. So I need to provide schoolmanagement.com for login and once my client login based on their login credential I redirect to their respective url e.g school1.schoolmanagement.com.

This is my understanding of multi tenant application. Is my understanding right? Is there any online multi-tenant application that I can go through?

Best Answer

Yes, that's it. But wikipedia's definition is not general enough. It does not address multi-tier architectures or newer forms of architecture like SOA or microservices.

Multi-tenancy is about software systems and data isolation. Some examples:

  • a multi-tier system with a unique database can be multi-tenant. Example: a SAP system is composed of a database backend and a couple of web application servers that expose in a scalable manner web-services. It is multi-tenant: you can add a new customer without changing the running software installation, and several customers can use the system without ever knowing about each other. The data is completely isolated (proprietary technology).
  • your system is composed of one or several processes running webservices that are exposed to different customers via different domain names (but it's still the same processes that run it on the server). The data isolation is achieved with separate databases. It's definitively multi-tenant.
  • a microservice system could similarly run several loosely coupled sets of webservices, each using an own micro-database. If needed in order to scale up, you could start new clones of the same microservices and they would via some registering feature find their peers and automatically connect to them, offering to the user the behavior of a single application. Then there are two scenarios possible:
    • if, when you want to serve a new customer, you have to start a new separate set of microservices, and organize that the microservices for one customer only connect to the microservices relating to the same customer, then it's single-tenant.
    • but if you could serve new customers using the running instances (and new microservices would only be needed for performance), then it's multi-tenant
Related Topic