Single-tenant vs Multi-tenant vs Multi-single-tenant
TL;DR
- Single-tenant: the infrastructure serves a single tenant.
- Multi-tenant: the infrasturcture serves multiple tenants, but there's no isolation (e.g. the same backend server may server multiple tenants, and the database may store data of multiple tenants).
- Multi-single-tenant: a single system runs multiple, individually-provisioned instances to serve multiple different tenants. The computing resources, data storages are isolated from each other.
An analogy: imagine you are a real estate developer
- Single-tenant: you only build one single house for one single customer, and you only serve this one family.
- Multi-tenant : you are building an apartment building, everyone lives in the same building, but in separate apartments.
- Multi-single-tenant: you are building a community of single family houses, each customer having their own separate house.
Single-tenant
Single-tenant: dedicated instance and resources serving only one customer.
For example, you run a database instance just to be used by yourself.
Single-tenant is not really a viable SaaS option.
Multi-tenant:
Multi-tenant: a single instance of software serves multiple customers (tenants), sharing resources.
For example, a database service serving multiple customers; if one customer used up all the resources, all the other customers will be impacted.
Pros:
- Lower Cost: serving hundreds or thousands of customers with one set of infrastructure.
- Easier Maintenance: only one instance to maintain.
- Easier to Scale: onboarding a new customer is as simple as adding a new entry to the tenants table in your database.
- Efficient Resource Utilization
Cons:
- Noisy Neighbor: Because tenants share resources (CPU, database connections), one tenant experiencing a massive, unexpected traffic spike can potentially degrade performance for all other tenants on the same infrastructure.
Multi-single-tenant
Multi-single-tenant: a service have multiple customers, but each customer has its own instance and resources.
For example, a database service serving multiple customers, but each customer has its own instance and dedicated resources; different customers are isolated.
Pros:
- Isolation: the primary benefit. Customers are fully isolated from each other.
- High Degree of Customization & Flexibility
- Easier to Meet Specific Compliance Needs
Cons:
- Higher cost and higher maintenance.
- Inefficient Resource Utilization.
- Slower Onboarding: each new customer requires provisioning new infrastructure and deploying and configuring applications.