Multitenancy: A Breakdown

By 
Maor Fridman, Estee Rebibo, Shomik Ghosh
June 7, 2022
Perspectives
5 min read
Share this post
Multitenancy: A Breakdown

Today almost every software company uses cloud and SaaS vendors. With this great migration, a technological architecture helping us gain the maximum benefit from the public cloud environment is imperative—enter multitenancy.

Multitenancy is key to implementing cloud solutions — so much so that Marc Benioff, the founder of Salesforce has said:

“multitenancy is a requirement for a SaaS vendor to be successful”.

But what exactly is multitenancy and why is it so important? In this piece, we zoom in on the intricacies, benefits, and complexities of multitenancy.

Multitenancy: Creating the Subway System

Before diving into multitenancy, we need to understand the alternative: single-tenancy. In a single-tenant environment, each customer uses a single unique application and database. That means if you have 100 customers- you have to manage 100 servers, 100 applications, and 100 databases.

Sounds tough, no? Single-tenancy takes a lot of time, money, and effort to maintain at scale. As opposed to single-tenancy, in a multitenant environment customers share resources (servers, compute, databases, etc.).

Think about it in terms of transportation: to get to work people can either drive or take the subway. Driving may allow you to enjoy the comfort of your own car, but you’d also have to pay for the car, gas, and parking (plus all the added traffic and pollution). The subway, on the other hand, is relatively cheap and leaves the roads clean and the ozone layer less destroyed.

If all 50,000 workers in the World Trade Center drove to work, we would have one chaotic mess of a system. And so, much like the subway, multitenancy was created to reduce costs and overhead and drastically decrease the ‘chaos’ in an environment.

Why Now?

Why the shift to the subway? If it’s really all that obvious-a-move, why has this not been the go-to? The answer lies in the cloud. Cloud computing and SaaS businesses are exploding in popularity.

If you look at the public market, companies that previously delivered self-hosted products are now rapidly turning to the cloud. Atlassian, Autodesk, Elastic, Microsoft and many more offer cloud-hosted solutions and are seeing explosive revenue growth due to this shift. Atlassian added over 10,000 net customers this past quarter — maintaining 10,000 customers using single-tenancy would bog down the company with individual engineering work, resource management, general complexity, and a drain of talent who now can’t work on core business problems.

So, while early startups may choose to start off with the ‘quick and dirty’ single tenancy environment, when they begin to scale and grow, companies will inevitably face a technical debt that only a multitenant environment can solve.

As cloud computing and SaaS businesses grow, so does the overhead of single-tenant solutions and the need for multitenancy.

Pros of Multitenancy

Multitenancy holds a lot of magic for SaaS vendors. The ability to share infrastructure across the customer base is (non-hyperbolically) game-changing. We’ve mentioned the scale multi-tenancy provides, but multi-tenancy has several other tricks up its sleeve.

Margins

The ability to leverage shared infrastructure directly hits the bottom line of vendors as the infrastructure is more fully utilized. Furthermore, multitenancy demands fewer resources allowing both talent and software/hardware costs to go down directly (in terms of cost of goods sold) and indirectly (in terms of key talent being able to focus energy elsewhere). This leads to increasing gross margins and, eventually, free cash flow which equals a higher valuation by the market.

Visibility

The use of multitenancy is also highly advantageous to understanding how infrastructure is performing or how certain groups of customers are faring. Data can and should be queried at both aggregate levels as well as a customer-specific granular level. In a single-tenant infrastructure, analyzing cross-customer metrics (like daily active users, top users, etc.) would be super difficult as each customer’s data is stored separately. However, a multi-tenant infrastructure gives teams a look across the entire customer base to see macro-level trends. This can be done at the logging, database level, and application performance monitoring level which highly benefits cross-functional teams.

As co-Founder & CTO of Kustomer, Jeremy Suriel, eloquently summarizes, “shared infrastructure results in reduced costs and improved velocity without the need to implement custom automation to manage an otherwise single-tenant hosted architecture that is easy to manage, monitor, maintain”.

Complexities of Multitenancy

However, with all ‘magic’ comes issues, and multitenancy is no exception.

Problem 1: Availability and the Noisy Neighbor

Let’s say you have an e-commerce business and store all customer data in one database. Most customers buy a couple of products every month, but one customer purchases 5,000 items every single day. If your database isn’t robust enough to handle this one customer’s spikey load, it can bring the whole database down and prevent other customers from completing their purchases.

This is a huge challenge and leads to decisions around data partitioning: silo partitioning (separate database per tenant) vs pooled partitioning (shared database across tenants). Silo partitioning can solve the issue well for a few customers, but if you need it for many then you’re back to the original pain point: managing lots and lots of database instances! Pooled partitioning works very well, until one customer takes all the load and lags the system, or worse, causes it to fail.

Problem 2: Shared Resources and Data Security

Additionally, there is a ‘shared resource problem’. Since all customers are using the same resources and there is no standard implementation of multitenancy, there are unavoidable engineering bugs that can lead to a crisscross of data between different tenants. This is highly problematic especially if you are serving competitors. Jeremy Suriel recognizes this risk and emphasizes the importance of “increased awareness of potential security exploits across tenant boundaries (data, application, etc…).”

These are some of the tradeoffs engineering teams have to evaluate, along with data sovereignty laws, compliance regulations affecting mandatory tenant isolation, and more.

Addressing The Complexities

Multitenancy has become one of the pillars of SaaS applications, yet there are still many complexities in implementing a multitenant solution that need to be taken seriously.

Itai Lahan, the CEO of Cloudinary, emphasizes this best when he said, “multitenancy is key to achieving operational excellence but requires a lot of knowledge and investment to get right.”

We at Boldstart and F2 have recognized the opportunities in this space and have invested in a startup directly addressing the pain points of multitenancy. Currently in stealth mode, this company aims to create the golden standard for multitenancy implementation for the entire stack (compute, queues, databases) reducing overhead and providing performance isolation, differential SLA, and a management panel.

Ultimately, while there are complexities to a multitenant system, the technical debt of scaling in a single-tenant environment makes it a no-brainer. Rather than having to spend a fortune of resources not to mention using the best engineers on the team to resolve that technical debt, taking away from the core business, smart startups are choosing to plan ahead and maintain a multitenant environment from the get-go.

There are major opportunities for startups to build large businesses solving the complexities that come with multitenancy and we cannot wait to see what founders build in the future.

If you’d like to contact us to chat more about the topic, please feel free to reach out:

Share this post