Traditionally, an organization with an on-premise application maintains a separate and dedicated server and storage space, i.e., separate applications and separate infrastructure. The shift to cloud computing has been lucrative for these organizations with the introduction of a multi-tenant architecture. In this new setup, the SaaS vendor uses the same server and storage space to serve multiple user accounts, i.e., the same application with shared infrastructure.
The best trait of a multi-tenant environment is that each of the tenants (user accounts) are unaware of the other’s existence within the same infrastructure and hence act independently.
Multi-tenancy is a requirement for a SaaS vendor to be successful. — Marc Benioff, CEO, Salesforce
A suitable analogy for understanding multi-tenant architecture is an apartment building. In this setup, you have a common building, hallways, and amenities (cloud environment), however, you can customize the allocated space (user accounts) according to your requirements.
Nowadays, several enterprise-centric SaaS applications support multi-tenant architecture. It is considered a profitable option both for the cloud provider and the SaaS vendor. Here’s how a multi-tenant architecture diagram looks like:
Let’s visit multi-tenancy in detail and see what the architecture entails.
What is a Multi-Tenant Architecture?
If a single instance of the software (workable application) is set up and runs on the cloud vendor’s infrastructure (AWS, Azure, GCP, etc.) and serves the needs of multiple customers simultaneously — it is known as multitenant architecture.
In this architecture, the customers are unaware of other data as it is stored exclusively. That is, the tenants are invisible to each other.
Instead of 10 copies of the OS, 10 copies of the DB, and 10 copies of the app, it has 1 OS, 1 DB, and 1 app on the server. — CNCCookbook CEO, Bob Warfield
What is Single-tenant Architecture?
In a single-tenancy architecture, a single instance of the software runs on a dedicated cloud server and serves a single customer. This setup is practically feasible for organizations with resource-intensive workloads.
A suitable analogy for single-tenant architecture can be a villa that you build for your family. In this setup, you have an exclusive building (dedicated server space) that you own. You do not have to share anything with anyone and all the computing resources are only available and accessible to you.
For SaaS products, a single-tenant architecture would imply that you are the tenant too, i.e., who owns the software is the only user.
Here’s how the single-tenant architecture looks like:
How Will You Choose Between Multi-Tenant and Single-Tenant Architecture
For a better understanding of the differences between single-tenant and multi-tenant architecture, here’s a consolidated comparison table:
|1. Single instance of software, single customer||Single instance of software, multiple customers|
|2. SaaS client is the tenant||SaaS client’s customers are tenants|
|3. Better security as it support a single tenant with no shareability||Security is a bit on the lower side due to increased shareability|
|4. No noisy-neighbor effect||Prevalent noisy-neighbor effect|
|5. Full-time resource availability which, in turn, fosters reliability||Resource availability depends on the priority list|
|6. You need to set up different server and storage space, which is expensive||All the tenants share the server and storage space, which proves to be cheaper as it promotes economies of scale|
|7. Scalability can be complex||Easier to scale whenever tenant capacity exceeds|
|8. Fewer chances of downtime||Downtime can increase due to multiple resource requests jamming the server|
What is the Noisy Neighbor Effect in Multi-tenancy?
When multiple tenants make requests to the same database server, performance issues are evident — resulting in noisy neighbors. The only effective way to manage allocation and deallocation of resources is “priority setting.”
If a SaaS vendor is listed higher on the priority list, they will be the first to receive the share of requested resources. And, if they hold those resources for long, the others in the queue are likely to suffer.
We respect your privacy. Your information is safe.
Types of Multi-Tenancy in Cloud Computing
There are two types of multi-tenant application architectures that you need to be aware of. These include:
1. One App Instance, One Database
In this setup, a single instance of the software supports a single database. All the user accounts that access the software product have their data stored in a single database.
This multi-tenancy architectural style offers scalability and increases the corresponding resources and capacity as and when the tenants increase. However, the biggest drawback of one app instance, one database is the noisy-neighbor effect.
- Easy to scale
- Cheaper due to shared resources
- Noisy-neighbor effect
2. One App Instance, Several Databases
In this setup, a single instance of the software supports multiple databases. Each of the tenants has a dedicated database that is exclusively and independently maintained.
This type of multitenancy can get expensive as you are asking for a separate space to store the application’s data. For expanding scalability, you would have to request the addition of database nodes, which can further add to the expenses.
- Low complexity
- Easy management
- No noisy-neighbor effect
- Low scalability
How does Multi-tenancy Work?
In a multi-tenant architecture, a single instance of the software is shared on the public cloud and is accessible to multiple tenants. However, when a new tenant boards, the software instance can be customized to suit their needs.
Here’s a Stack Overflow discussion thread that rightly defines an instance.
Although every tenant accesses the same software application, the instance customizations change the product experience for every tenant.
Benefits of Multi-Tenant Architecture
Why are SaaS vendors choosing multi-tenant architecture for their applications?
Here’s the answer:
1. Economies of Scale
Multi-Tenant Architecture allows renting the common resources for your application on the cloud infrastructure. The cost you pay to host a multi-tenant software application is fixed and may vary with time. But, the value coming from each of the customers is only likely to expand.
You pay for cloud resources (which are fixed and vary with scalability), but the value and profits it brings along with every added customer is high. Thus, helping in improving economies of scale.
2. Expedient Maintenance, Updates, and Upgrades
In the case of SaaS Multi-tenant Architecture, users do not have to pay a considerable amount of fees to keep the software up to date. Maintenance costs are usually associated with a SaaS subscription and aren’t charged per case, unlike a Single-tenant structure.
Even the data structure does not need any change as the code is shared and remains standard. It is easy to make upgrades to the technology stack or the application itself since it needs to be done at just one centralized point and is then reflected at all tenant ends.
The maintenance costs, especially for updates, get shared by all the tenants as they use the code from the same pool. This reduces the overall cost of maintenance for each tenant.
3. Convenient Onboarding of New Tenants
Multiple customer onboarding has become a prime focus for vendors since a poor user experience can directly affect the growth prospects. Hence, bringing customers and multiple users on board for using the product is a crucial task.
In a Multi-Tenant Architecture, the process of signing up and configuration of subdomain/domain are automated. The application also automatically performs tasks like the setup of default data for clients and configuring the application, thus making it easier still for the user to configure.
4. The Virtue of Scalability
As more hardware is added to a Multi-Tenant SaaS model, the horsepower of the entire system is powered up, thus providing scalability to all the tenants that are using the application and not just the newly added tenant. At times, it can be as simple as adding more hardware for the same existing resources of the technology stack.
Unlike a single-tenant solution, a vendor does not need to build a new and unique data center for every new tenant when using a multi-tenant architecture.
In multi-tenant applications, the server space scales up and down based on the tenant strength.
One SaaS vendor deploying the application on the cloud, which then supports multiple users — is a multi-tenant architecture. This architecture proves beneficial for both the cloud provider and the SaaS vendor.
Before you go on to create your software as a service product, it is imperative to know what is multi-tenant, how it differs from a single-tenant architecture, and what it will do for your business.
The choice you make is going to set the foundation for your business in the long run.