Ihor
Feoktistov
CTO at Relevant

Multi-Tenant Architecture: Designing a SaaS Application

SaaS

Cloud infrastructures are a fast-growing trend in the IT industry. According to Gartner’s 2019 forecast, the revenue from Software as a Service applications will increase from $94.8 billion to $143.7 billion by 2022. But many top-level managers still have questions about single-tenant and multi-tenant SaaS database designs.

Multi-Tenant Architecture: Designing a SaaS Application

Do you want to make sense of tenancy in software services? How should you build a multi-tenant database design in SaaS? You’ve come to the right place!

We will answer your questions and help you pick the optimal SaaS architecture for your business. Without further ado, let’s dive in!

Single-tenant vs. multi-tenant design

Software as a Service (SaaS) is a cloud-based distribution model that allows users to access applications remotely. You may have heard about single-tenant and multi-tenant SaaS architecture before. One could wonder, what does tenancy have to do with software services?

It’s easy. The tenancy is an analogy for exchanging computing resources in a software environment, where tenants represent neighbors living either in the apartment building (or a private household). Now, what are the differences between single-tenant and multi-tenant databases for a SaaS?

In a single-tenant architecture, the tenant owns an application. Each client uses an isolated database, storage, and web server. Single-tenant design is popular among larger enterprises that want maximal customization and secure solutions. The customer often hosts the app. Consequently, it’s up to them to develop, host, and maintain the cloud infrastructure.

The examples of a multi-tenant architecture include such services as:

  • Gmail: email clients are the prime examples of SaaS that doesn’t require setting up and maintenance.
  • Google Drive and Dropbox: cloud file hosting services offer secure and easy-to-access storage over the Internet.
  • Shopify: multiple tenants use Shopify to host their platforms while sharing the database with other website owners.

Multi-tenant SaaS providers allow clients to run sophisticated apps and large databases immediately while spending less money. Moreover, tenants don’t have to maintain the infrastructure, allowing them to save storage, hardware, and CPU costs. Therefore, it’s a perfect option for startups, medium-sized companies, and organizations with smaller IT teams. 

But there are more benefits to a SaaS multi-tenant database design.

Advantages of multi-tenant architecture

Now, let’s look at the benefits of a SaaS multi-tenancy for businesses:

  • Efficient resource distribution. Businesses don’t have to waste budget on development, delivery, and support. And, as such, they won’t need to upgrade the hardware and network capacity as they grow.
  • Maintenance-free. The service vendor takes care of the maintenance, allowing companies to save money and focus on other business goals.
  • Third-party integration. It’s true that a single-tenant design allows for more customization. Nonetheless, multi-tenant SaaS apps with advanced APIs can easily integrate with other third-party software.
  • Fast scaling. Most SaaS apps are subscription-based, but every vendor offers different pricing models. Smaller teams can pay a standard monthly payment to access the service. Larger enterprises, on the other hand, can benefit from the per-user model (where they pay only for active users). This allows companies to quickly adjust the expenses based on their needs.

Let’s sum up the pros and cons of single-tenant and multi-tenant approaches. Single-tenancy requires more resources but offers advanced security and customizability. But in the multi-tenant model, the vendor owns and maintains the infrastructure, making it a cost-effective and scalable choice for most businesses.

Advantages of multi-tenant architecture

How to design a multi-tenant SaaS

The tenancy model will impact the essential aspects of your SaaS. You should build the service around your business needs instead of arbitrary assumptions.

Here are the multi-tenant models you should consider:

The Ultimate SaaS Application Development Guide
At Relevant, we’ve helped more than 200 companies excel by developing SaaS solutions for startups and mature businesses.
Get a copy
  • Database-per-tenant. Each tenant gets a new database. The app tiers are scalable either vertically (adding resources per node) or horizontally (adding more nodes). However, the databases in the same resource groups are divisible into elastic pools. Vendors can move tenant databases between these pools to optimize resource management.
  • Single multi-tenant database. A multi-tenant database consists of several tenant identifier columns, while the storage and compute resources are shared by all users. This results in lower per-tenant expenses. On the other hand, a single tenant’s workload could impact how the service performs for others.
  • Sharded multi-tenant databases. Sharding allows storing tenant data across several databases. As the workload grows, you’ll be able to split densely populated shards into multiple less populated nodes (or merge them back just as easily). On top of that, sharded databases can be put into elastic pools to further enhance operational management and scalability.
  • Hybrid sharded multi-tenant databases. You can move a tenant or whole groups between dedicated and shared databases. This approach works best when you have several identifiable tenant groups with contrasting resource needs (free trial tiers and premium subscribers).

When designing multi-tenant applications, you should consider the number of tenants and their isolation, onboarding, and policy management mechanisms.

Tenant isolation

Tenant isolation (or tenant partition) refers to tools that prevent other tenants from accessing other users’ content. As such, it’s one of the fundamental aspects of the SaaS multi-tenant data architecture.

Here’s the deal. As you know, every user shares resources in multi-tenant environments. Therefore, security, privacy, and confidentiality should be your top focus during development. Now, what data isolation strategies in a multi-tenant SaaS environment are the most common?

Silo isolation

The silo model consists of separate isolated clusters, with each tenant owning storage and infrastructure resources. This partition type is synonymous with single-tenant SaaS architectures. 

Silo allows SaaS providers to create stronger boundaries for tenants. Consequently, it’s easier to calculate resource usage data for every client. The downsides of this model include higher infrastructure costs, complicated development, and costly management.

Pool isolation

Pool isolation refers to a SaaS multi-tenancy architecture pattern where multiple users share the same infrastructure. This partition model has weaker boundaries between tenants and poses more risk of cross-tenant access. Nonetheless, the pool isolation model enables vendors to scale their resources in proportion to the user-base and resource usage.

Bridge model

The bridge model is a hybrid of silo and pool partition with shared and isolated infrastructures. How does it work?

For example, your tenants can share the same web server or database using a pool model but have separate tables or microservices for different users.

Tier-based isolation

The tier-based model works like the bridge model, but the types of isolation are based on the subscription plan. The free tier users will share the infrastructure with other tenants, while premium subscribers can have dedicated environments with less risk of cross-tenant access.

200+ companies from 25 countries outsourced software development to Relevant

We provide companies with senior tech talent and product development expertise to build world-class software. Let's talk about how we can help you.

Contact us

Tier-based partition is the most salable solution that also prompts users to buy premium plans. But remember: the maintenance costs will grow as more tenants switch to isolated environments.

Onboarding process

So, your SaaS managed to gain traction. But customer retention should concern you just as much as customer attraction.

Look: every subscription-based SaaS experiences churn (also known as customer attrition). According to reports, churn rates for cloud-based services range from 16% to 37% across different industries. 

And here’s the best part: it’s possible to reduce customer attrition by making your service more understandable to new tenants. This process is called tenant onboarding, and it includes providing users with:

  • Documentation
  • Tutorials
  • Videos
  • Customer service
  • Intuitive interface

Most importantly, you should automate these processes for maximum convenience. 

An experienced software developer will know how to build a multi-tenant SaaS application with an automated provisioning mechanism. On top of that, the right IT company can update your app with an onboarding solution to improve the tenant retention rate.

Tenant usage analytics

Resource consumption metrics are fundamental for a SaaS business. With a comprehensible view of your entire infrastructure, you can learn what microservices and subscription modes provide the most value. 

The metrics you should monitor include:

  • Number of active clients and active users for every subscription tier
  • Infrastructure costs per tenant and subscription
  • Memory and storage utilization indicators
  • User interaction activity
  • Profits per tenant and tier

This data can affect your entire business plan. For instance, you’ll be able to shift focus on features that generate the most revenue while requiring fewer resources. Plus, you will set an optimal threshold for tenant consumption if they regularly exceed limits.

The bottom line: you should design a multi-tenant application with a mechanism that can accurately collect a wide range of resource consumption metrics.

Tenant configuration

As your product evolves, you need to improve the way you address your tenant’s needs. How? You can do this by implementing a centralized tenant configuration tool for policy management.

Why these 200 tech companies & startups outsource to Ukraine
Download the whitepaper

Tenant policies allow you to adjust the user experience in terms of available features, performance, limitations, and SLAs (service-level agreements). Furthermore, you’ll be able to quickly customize whole categories of tenant personas.

Now, let’s see how you should approach SLAs in multi-tenant cloud services.

SLAs in a multi-tenant architecture

Service Level Agreement (SLA) is a contract between a SaaS provider and a customer. It defines what customers should expect from your app in terms of features, security, and availability time. In other words, this document outlines the user experience.

SLA strategies

SLA isn’t just a legal document. It’s a tool that allows you to measure how your service meets your tenant’s expectations.

Therefore, you should adapt your SLA with the SaaS. How can you achieve that? Let’s look at some proven strategies:

  • Service tiering. A part of your user-base wants to pay for advanced functionality. SLAs allow you to determine your product’s value independently from the rest of the market. As a rule of thumb, the more you offer, the more you can ask from your tenants.
  • Framework. A SaaS framework will help you understand customer needs to measure your value. We recommend creating a dashboard to track the tenant’s performance over time against the SLA’s objectives. As you analyze metrics, you’ll know what tiers and features to adjust to improve your service.
  • Business Impact. In multi-tenant SaaS design, user groups consume different amounts of resources. Thus, some of them can exceed the limits, resulting in lost revenue. You should observe the tenant traffic patterns using SLAs to balance the cost and operational efficiency for each tenant, tier, and feature.
  • Reports. So, you’ve implemented a mechanism for measuring tenants and application consumption regarding SLAs. Now, it’s time to create a reporting tool to help management teams analyze this data and make informed decisions.

To sum up, SaaS providers should alight business outcomes with customer expectations. And, if you want to expand your service and reduce churn rate, your SLAs should contribute to your multi-tenancy model.

Summary

Multi-tenant SaaS offers multiple advantages for startups and SMBs because of its cost-efficiency and scalability. But developing a multi-tenant service goes beyond architecture design.

The number of users, partition model, onboarding process, configuration management tools, and SLA — these are the core factors you need to consider from the very beginning.

A reputable software development company can supply you with the relevant tech stack and create a detailed product roadmap. If you want help developing a multi-tenant SaaS application, feel free to drop us a line!

Tags: cloud
Written by
Ihor Feoktistov
CTO at Relevant
I make sure our clients get the highest code quality and the best tech talent on the market. I am also a Software Engineering Advisor for startups. Let's connect.

Do you want a price estimate for your project?