Wednesday, July 8, 2009

What is multi-tenancy?

Back in the days, when computers still had CD-ROM drives and BSOD's were daily routine (though some may argue that this is still the fact), the software industry was quite different from today. Software was being sold on CD-ROMs (those rounded, shiny things), from which the software could be installed. After this era, fast Internet access became available and CD-ROMs slowly disappeared. Now, a customer would download software and install it on their computer. This type of software, which installs on the customer's computer, is also known as on-premises software.

Although this system worked, there are some downsides to it. An example is the upgrading process: since all software copies are on different computers, a software upgrade must be pushed to all these machines.

Wouldn't it be cool if we could perform the update in one place instead?

This is exactly what multi-tenancy is about. Multi-tenancy allows multiple users (tenants) to use an application which runs on the same computer. This can be done in two ways:

  • Multiple instances
  • Share instance

The multiple instances pattern runs an application instance for each user, for example by using virtual machines. The obvious downside of this is the resource requirement, as each instance requires allocated memory. Since this pattern is in fact single-tenancy, I will not discuss it further.

The share instance pattern shares the application instance and database amongst multiple users (see figure). This means that we can do an upgrade on only one instance - imagine how much we could save on costs and time! Of course this isn't the only advantage of running a multi-tenancy application over a single-tenancy one. I will discuss the advantages (and disadvantages) of native multi-tenancy applications in a next blog post.

1 comment: