Location>code7788 >text

Illustration: what is multi-tenancy?

Popularity:716 ℃/2024-10-26 17:25:16

Hello, I'm Master Tang~

What is multi-tenancy?

Multi-tenancy is a concept unique to the SaaS (Software as a Service) space. In SaaS services, the term "tenant" refers to the customers who use the SaaS system.

So what is the difference between a tenant and a user? Let's take an example. Let's say you're using a business-oriented (ToB) SaaS product. "Users" usually refers to the employees in your company who actually operate the SaaS system. A "tenant" is an entire company or organization. In other words, a tenant may contain multiple users.

Multi-tenancy is a software architecture that allows multiple tenants to share the same system instance while ensuring that each tenant's data and behavior are independent of each other and do not interfere with each other. In other words, although all tenants are using the same system, their data is completely isolated and secure.

Traditional Software Model VS SaaS Model

A traditional software project typically involves a software company developing a specific software system specifically tailored to a client's needs. This software is then deployed in a separate environment, usually a server within the organization.

The SaaS model is different in that it deploys software services in a cloud environment. Different customers are able to use the same software services through browser or web access. It's like a buffet restaurant that prepares a wide variety of dishes that anyone can come in and taste without having to cook for themselves.

Multi-tenant scenarios

For enterprise (ToB) oriented SaaS products, multi-tenant usage scenarios generally involve three main players: business owners, employees, and SaaS platform operations.

1. Business owners

Business owners, i.e. the managers of a company, are the direct customers of the SaaS platform. To subscribe to and use a SaaS product, a business owner first creates a "business account" (a.k.a. a tenant) on the SaaS platform.

In this process, the business owner needs to register a company account and fill in the relevant information. Once this is done, the system creates an exclusive "tenant space" for the business owner.

Business owners can then order the products they need and add employee accounts in this space. Once employees are added to the tenant, they can use these products by logging into the SaaS platform.

2. Employees

An employee may be added by more than one organization, i.e. the user belongs to more than one tenant. This means that employees need to switch to the corresponding tenant as appropriate when using the SaaS platform.

For example, switching to company A for tasks that deal with company A today, and switching to company B for tasks that deal with company B tomorrow. This tenant-switching design allows employees to switch between multiple corporate accounts with ease, avoiding identity confusion that affects the usage experience.

3. SaaS platform operations

The primary responsibility of the SaaS platform operations team is to manage the tenants. They need to ensure that each tenant's permissions, resource allocation, and product capabilities are properly managed.

For example, when a business owner adds a new employee, the platform must ensure that the employee only has access to the data of the organization to which he or she belongs. SaaS platform operations can also respond quickly if a business owner wants to adjust a subscription.

Tenant management involves a series of complex operations such as privilege control, resource scheduling, capacity provisioning, billing management, etc. It is the role of the SaaS platform operations team to ensure that all this runs smoothly.

This article has been featured on, my tech site: Inside there are, algorithm Leetcode detailed explanation, interviews eight stock text, BAT interview questions, resume templates, architecture design, and other experience sharing.