Zuzanna Pajorska

What is Multitenancy? Definition of Multi-Tenant Architecture

How do SaaS providers solve performance issues? What is the architecture underling under applications that are hosted on the same server and serves multiple customers  who generate huge amount of data? In this article, you will learn the basics related to the multi-tenant architecture, its benefits as well as the difference between single- and multitenancy.

Building a new application or extending your development team?

🚀 We're here to assist you in accelerating and scaling your business. Send us your inquiry, and we'll schedule a free estimation call.

Estimate your project

What is multitenancy?

Multitenancy, also called multi-tenant architecture, is a software architecture in which a single software instance along with a database serves multiple tenants.

By tenant, we mean either an individual user or, more commonly, a group of users (i.e. organizations) that use the same computing resources of a given application.

Services offered by a SaaS company are often based on multi-tenant architecture.

This kind of cloud-based solution allows multiple users to access the same software application and share the same infrastructure. Multitenancy keeps tenants’ data secure, isolated and well-organized within one database. Even though multiple tenants share the same database, they cannot see each other’s data.

The opposite of multitenancy is a single-tenant architecture. It applies mostly to specific industries where a strong privacy of customer’s data storage is required. In a single tenancy environment, customer data is separated from other customers’ data.

To explain what multitenancy is, we use the shepherd metaphor.

Imagine a shepherd who runs a sheep-keeping business. They have a large pasture, so they rent it to other sheep owners. They end up having on their terrain hundreds of sheep from numerous owners. One of their biggest challenges is to figure out who a given sheep belongs to.

The question is: how does the shepherd manage and maintain the barn in order to know exactly where specific sheep are located?

Multi-tenant architecture solves this problem inside SaaS applications or large data centers.

Is the amount of data slowing down your SaaS application? You’re probably struggling with organizing your database. It’s time to consider implementing a multitenancy architecture. Consult your issue with our experts.

What is multitenancy in cloud computing?

Multitenancy is a very important concept in cloud computing. However, it is worth mentioning that even though the cloud computing and multi-tenant architecture often go hand in hand, those are separate constructs.

Multi-tenant architecture for SaaS applications can be introduced both on local servers and in the cloud. But here we’ll look at the advantages of hosting in the cloud.

If you have an application with at least a few thousand users and a lot of data, you’re probably struggling with performance issues.

To improve the efficiency of your application, it is reasonable to deploy it in a cloud environment rather than on a local server.

Following this logic, when implementing a multitenancy architecture for your application, consider using the cloud.

The reason is simple. It does not impose restrictions when it comes to computing resources.

Most of the modern applications (some of the most popular we are mentioning below) are hosted in the cloud. It allows users to access, for example, their Google accounts and transfer files from various devices.

In brief, running a cloud application in multi-tenant architecture makes it easier, more efficient and flexible.

Multi-tenancy architecture with examples

The most popular instances of multitenancy in SaaS applications are:

  • Google Workspace,
  • Salesforce,
  • Dropbox,
  • Atlassian,
  • Adobe,
  • Netflix,
  • Slack,
  • Recostream,
  • Zoom,
  • Oracle.

What all the above applications have in common is the way they manage user data and users’ access to the application. One of the hardest struggles that a multi-tenant architecture solves is a data separation.

Providing SaaS without the multitenancy architecture would mean that a new setup for each customer would have to be created on a separate application server with its own assigned database.

There would be no common application part for all users, but each client would have a separate application completely isolated from other clients/organizations.

This is a suboptimal solution because it requires installing the same application many times, doing application updates on several servers at once, thus using more resources.

To avoid the above challenges, most of the SaaS providers use multitenancy.

What are multi-tenant databases?

There are three most popular approaches to managing and organizing data in multi-tenant architecture.

To illustrate it, let’s go back to our shepherd metaphor.

In their large territory, a shepherd is in charge of many sheep that belong to different owners. The challenge for the shepherd is to organize the space in such a way that they know which sheep belong to which owner.

In order to keep the sheep safe and well located, the shepherd has to build a barn. They can do it in a couple ways. They have to keep in mind how many sheep and clients they serve, as well as what kind of resources they have.

The shepherd, in order not to confuse the sheep, can choose from three options:

  1. Put on a collar for each sheep with an owner information label and keep them in a big barn;
  2. Set up separate boxes inside a single large barn, where each box is assigned to  a particular owner’s sheep;
  3. Build multiple, smaller barns dedicated exclusively to specific sheep’s owner.

Having multiple tenants requires making a proper decision about the data storage at the very beginning of the introduction of the multi-tenant architecture.

We will briefly talk about each type of multitenancy database.

For a more detailed explanation of multi-tenant databases, we highly recommend reading our in-depth introduction to multi-tenant architecture. There, we thoroughly point the differences between each type of databases and also discuss its advantages and disadvantages.

Planning to incorporate multitenancy architecture into your SaaS application? We will do it for you! Describe your issues to us and let’s stay in touch.

#1 Shared database

A shared database in multitenancy allows distributing users’ data across multiple databases (shards), with all the data for a particular tenant being contained in a single shard.

tenant's data in multi-tenant solutions

#2 One schema per tenant

In this type of the data store infrastructure, we create multiple schemas in the same database to provide some level of data isolation to the users. The schema is a separated area inside the database. You can name its subdirectories with tables containing the user’s data, like in the example below.

multitenant architecture

#3 One database per tenant

In this type of multi-tenancy database, each tenant has their own, dedicated database. Every time a new tenant is added to the system, a new database is generated.

Inside the main server, we have separate databases dedicated solely to specific tenants.

data security and multiple customers

What is the difference between single tenant and multi-tenant?

The main difference between the multi-tenant and single-tenant architecture is the way the software serves its clients.

In the multi-tenant architecture, a single instance of software serves multiple customers. Each tenant shares the same software application. Their data is isolated and invisible to other tenants.

In the single-tenant model, there is a dedicated software serving only a single tenant. With the single tenancy, each client has their own database and instance of the software.

Let’s see how the single tenancy works with an example.

Imagine an accounting company that operates on its own payroll system. The system is hosted on the company’s server and only the employees are allowed to use it on the same software. This is a simple example of a single tenancy system. The key point is that operations are performed only for one organization on its own server.

single tenant cloud vs multi tenant environment

Benefits of multi-tenant architecture

We looked at the most important aspects of multitenancy. Now, the question is why you should consider this solution.

Here are the key benefits of multitenancy:

  • Saves money and time – since the same application and database serve multiple tenants, the cost of development and maintenance is significantly lower. Moreover, you don’t have to neither make changes in code nor set up a new database for each tenant separately.
  • Increases efficiency – the multi-tenant architecture allows for the more efficient use of IT resources. The efficiency of the application depends on the type of multi-tenant database you choose.
  • Improves performance – with massive amounts of tenants data, users can influence each other’s performance. The third type of multitenancy (one database per tenant) solves this problem. To learn more about good practices, check our article about data scalability, processing, and allocation in multitenancy.
  • Makes it easier to manage databases – when an application processes data from multiple tenants, then we need to find a way to manage the huge amount of data. It helps you to know which data belongs to which organization (tenant).
  • Allows for easy use from the user’s point of view – users are neither responsible for maintenance, updates, nor infrastructure and data management.

In Stratoflow we have introduced multitenancy to our SaaS product Recostream – a recommendation engine based on machine learning. Multi-tenancy architecture allows Recostream to efficiently service everyone from small customers to large enterprises with thousands of users. As a result, software development and maintenance costs are shared.

Hungry for more? Check our series of articles fully dedicated to Evolutionary Hybrid Multitenancy.

Building a new application or extending your development team?

🚀 We're here to assist you in accelerating and scaling your business. Send us your inquiry, and we'll schedule a free estimation call.

Estimate your project


The developed software product was built from scratch with solid quality. We have had a long-term engagement with Stratoflow for nearly 10 years. We look at them as partners, rather than contractors. I'm impressed by their team culture and cross-team support.

Nathan Pesin

CTO, Legerity Financials

Stratoflow was a great partner, challenging as well as supporting our customer projects for the best outcome. They have a great pool of talent within the business - all very capability technologists, as well as being business-savvy and suitable for consultancy engagements.

Chris Goodall

Managing Consultant, CG Consultancy (UK) Limited

The bespoke metal exchange platform works great, it is easily accessible and richly functional. Stratoflow managed deadlines capably, meticulously documented their progress, and delivered a complex project at an affordable cost.

Bartlomiej Knichnicki

Vice Chairman, Supervisory Board

We are very pleased with our partnership with Stratoflow and, as we continue to grow, we expect to increase the numbers of developers that work with us on our projects. They have proven to be very skilled and flexible. They're extremely reliable, and they have a very good company culture of their own, which gives them a real edge compared to other providers that serve more as production shops rather than thought partners and creative problem solvers.

Andrew Kennedy

Founder & Managing Director, Tier 2 Consulting

Stratoflow successfully customized the system according to the specific functionalities and without bugs reported. The team was commended for their adaptability in the work process and for their responsiveness.

Joshua Blavins

Tech PM, Digital Agency

The features implemented have received overwhelmingly positive feedback from end-users. Stratoflow has an incredible technical expertise and a high degree of flexibility when it comes to changing project requirements.

Adam Hill

Chief Technology Officer, Legerity

They have impressively good knowledge of AI issues. Very responsive to any amendments and findings. Very good communication. We received a finished project which could be implemented into production shortly after testing.

CO-Founder & CTO

Circular Fashion Company

They provided superb service with seamless communication and a highly professional, technical approach. The team displays impressive technical expertise and are willing to share information and engage in constructive feedback.

Filip Stachnik

Operations Manager, Otwarte Klatki (part of Anima International)

They're very skilled technically and are also able to see the bigger picture. Stratoflow can actually think about solutions, not just the technical task at hand, which they've been assigned.

Arnd Jan Prause

Chief Operating Officer, musQueteer

Stratoflow delivered the website successfully within the timeframe and budget. They assured that the output met the set requirements. Overall, the team's performance was excellent and recommended for their exceptional technical business expertise. They've been able to deliver all of their work on time and within budget, which has been very impressive.

Lars Andersen

Founder & CEO, My Nametags

Travel sector rebound after the pandemic is complete. We have fantastic global coverage of travel data distribution due to mutual agreements and data exchange between aggregators. Competition for the best price of limited resources degradates margins.

How to win? Provide personalized experience and build your own products in the front-office. The missing bits: a traveller golden record collecting past activities and a AI/ML recommendation technology.

Michał Głomba

CEO at Stratoflow