Multi-Tenancy

Sruti Samatkar
4 min readNov 12, 2021

What is Multi-Tenancy?

Multitenancy

The public cloud is built upon the operating principle of multitenancy. This simply means that many different customers share the use of the same computing resources. The physical servers that support my workloads might be the same as the physical servers supporting your workloads.

Single-tenant vs Multi-tenant

Single-tenant vs Multi-tenant

The key difference between a single tenancy and multi-tenancy in the cloud is that in a single tenancy every user or tenant has an independent database and instance of software while multi-tenancy means the tenants are free to share their software application and database.

Evolution of Multi-Tenancy

Multi-tenancy has evolved from a combination of three types of services- timesharing, hosted applications, and web applications. Since the 1960s, companies have been utilizing time-sharing, which is the sharing of computing power among multiple users to reduce computing expenses. Fast forward to the 1990s, where application service providers hosted software applications on behalf of their customers. A similar idea was developed for consumer-oriented web applications which were developed to serve multiple customers with a single instance of the software. A multi-tenant environment represents a direct evolution from web applications.

Security

In an ideal world, an individual customer should never see the impact of multitenancy. Servers should appear completely independent of each other and enforce the principle of isolation. From a security perspective, one customer should never be able to see data belonging to another customer. From a performance perspective, the actions that one customer takes should never impact the ability of another customer to take actions. Preserving isolation is the core crucial security task of a cloud service provider.

Oversubscription at Work

Multitenancy allows cloud providers to over-subscribe their resources. Almost all computing workloads vary in their needs over time. One application might have a high CPU utilization for a few hours in the morning, while another uses small peaks throughout the day.

High CPU Utilization for a few hours
CPU Utilization in small peaks throughout the day

And others have steady use or different peaks.

Steady CPU Utilization
CPU Utilization at different peaks

Over-subscription means that cloud providers can sell customers a total capacity that exceeds the actual physical capacity of their infrastructure because, in the big picture, customers will never use all of that capacity simultaneously. When we fit those workloads together, their total utilization doesn’t ever exceed the total capacity of the environment. This works because of a concept called resource pooling.

The memory and CPU capacity of the physical environment are shared among many different users and can be reassigned as needed. And of course, this concept sometimes breaks down. If customers do suddenly have simultaneous demands for resources that exceed the total capacity of the environment, performance degrades.

This causes slowdowns and even outages. Preventing this situation is one of the key operational tasks of a cloud service provider, and they work hard to manage workload allocation to prevent this from happening.

Advantages of Multitenancy

  1. Better use of resources
  2. Lower costs
  3. Ease of adding a new customer
  4. Convenience in maintaining the application
  5. Sharing of database schema

Drawbacks of Multi-tenancy

  1. Less flexible, more complex
  2. Corrupted data or spilling of data from one tenant to another
  3. Possible security risks and compliance issues
  4. The “noisy neighbor” effect

--

--