Skip to main content

Multitenancy

What is Multitenancy?

Multitenancy is an architecture in which a single instance of a software application serves multiple customers. It gives the ability to use the same software and interfaces to configure resources and it isolates customer-specific traffic and data.
Each customer is called a tenant. Tenants may be given the ability to configure some parts of the application, such as color of the user interface (UI) or business rules, but they cannot change the application's code. This means that although tenants are using the same building blocks in their configuration, the appearance or workflow of the application may be different for two tenants. Also, the Service Level Agreement (SLA) of each tenant can differ [1].

Multitenancy vs. Singletenancy:

Multitenancy can be economical because software development and maintenance costs are shared. It can be contrasted with single-tenancy, an architecture in which each customer has their own software instance and may be given access to code. With a multi-tenancy architecture, the provider only has to make updates once. With a single-tenancy architecture, the provider has to touch multiple instances of the software in order to make updates [1 and 4].

Multitenancy in Software as a Service:

A software-as-a-service (SaaS) provider, for example, can run one instance of its application on one instance of a database and provide web access to multiple customers. In such a scenario, each tenant's data is isolated and remains invisible to other tenants.

Example on Multitenancy:

Imagine you have to provide housing for a number of tenants. You could do one of two things: Provide a separate house for each tenant to live in, or provide tenants with individual units within one apartment building. The former would include higher costs, a poor utilization of resources (because a single tenant wouldn’t use all the space in a house), and poor maintenance (because it would be difficult to maintain so many houses). The latter option would eliminate these disadvantages: It would be cheaper, the resources (space or air conditioning) provided to each tenant would be better utilized, and maintenance would be easier and cheaper [3].

Multitenancy Advantages:

Simplify Data Mining: Instead of being collected from multiple data sources, all data for all customers is stored in a single database schema. Data mining, running queries across customers, and identifying trends is simplified.

Decrease Costs: Each instance of an application usually incurs a certain amount of memory and processing overhead, and the cost can be substantial when multiplied by many users. Multitenancy reduces this overhead by amortizing it over many users. The licensing costs of the underlying software can be cut because everything can be run on a single software instance, so only one software license will need to be purchased.

Streamline Release Management: Multitenancy streamlines the release management process. Traditionally, packages containing code and database changes had to be distributed and installed on each client desktop or server machine. With the multitenant model, the package may only need to be installed on a single server.

Economy: software development and maintenance costs are shared between the tenants [2].

Degrees of Multitenancy:

The degree of multitenancy is based on how much of a core application or SaaS, layer is designed to be shares across tenants:
  • Lowest degree: IaaS and PaaS are multi-tenant, while SaaS is single tenant.
  • Middle degree: IaaS and PaaS are multi-tenant. Small SaaS clusters are multi-tenant.
  • Highest degree: IaaS and PaaS are multi-tenant. SaaS is fully multi-tenant also.
Google has an apparent single instance for all Google Apps users.  When there’s a new update, all customers get the update at the same time.  Salesforce.com has its multi-tenant architecture segmented into over a dozen CRM instances. Microsoft’s online CRM solution is multi-tenant on the application instances, but each customer has their own SQL Server database, since Microsoft’s underlying database technology was not designed for a large-scale, public cloud.

Even multi-tenancy has limits to scalability. The Twitter fail whale has demonstrated that it’s technically challenging to put all users and all data on a single instance of a multi-tenant environment but Twitter, by definition, has to be a single, large instance — as any user has to be able to access any other user’s content [3].

Multitenancy Architecture:

Multitenance Architecture [5]
In the diagram below, Multi Tenancy is represented as a continuum to highlight the fact that multi tenancy exists in varying degrees. The diagram shows the three basic designs by which the data layer can be handled. 

Note that the application layer is left out of the diagram since the basic assumption is that in multi tenancy, there will be a single instance of the application. 
This single instance of the application could point to either of these three database configurations to provide a form of multi tenant setup.

On the right end of the continuum, we have ‘extreme’ multi tenancy where all clients share the same database schema (tables); they are segregated merely by table design. 
In the middle we have a scenario where the database is still shared, but each tenant has their own dedicated schema (tables). 

On the left end of the continuum, we have a scenario where each tenant has their own database instance. Each configuration has its own merits and demerits and any database expert could list those out. While the diagram shows these three configurations, the reason I call it a continuum is that there exist a number of variations in configuration that fall anywhere between the two ends of the continuum [5].

References:
  1. http://whatis.techtarget.com/definition/multi-tenancy
  2. http://apprenda.com/library/glossary/definition-multitenant/
  3. http://www.cloudtweaks.com/2012/06/multi-tenancy-in-the-cloud-understanding-its-benefits/
  4. http://www.crmswitch.com/buying-crm/single-tenant-crm-vs-multi-tenant-crm/
  5. http://ecomcanada.wordpress.com/2011/06/29/multi-tenancy-in-cloud-computing/
Additional Reading:

  1. http://www.computerworlduk.com/business-it-hub/management-briefing/3358580/five-secrets-your-cloud-provider-wont-tell-you-about-multi-tenancy/ 
  2. http://www.dummies.com/how-to/content/multitenancy-and-its-benefits-in-a-saas-cloud-comp.html 

Comments

Popular posts from this blog

Retrieve Data from Database and Compare it with user input using Java

In this Lesson we will create a form page " form.jsp " that takes the user email. After that we will check the user existence in our DB. If the user email stored in the DB, a welcoming page will be opened to him/her. If the user is a new user then a message will be displayed that tells him/her this email is not stored in our DB. Note: I use access 2013 database and Eclipse Juno     Basic step, Create a new project: Open Eclipse then click on File > New > Other > Web > Dynamic Web Project. First, Load the DB class: In this step we will connect with database so we will gather all its code in a java class named " DBConnection.java " under a package called " code ". Expand your project then right click on java resources > New > Package . After-that Give a name for your package ex, code   Right click on your created new package that called code > New > Class.   After-that Give a name for your Class ex, DBConnection.  

An attempt was made to insert a node where it is not permitted

Do you face this Error while you are writing code to generate xml file from java? Exception in thread "main" org.w3c.dom.DOMException : HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.        at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(Unknown Source)        at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)        at generatexml.WriteXMLFile.main( WriteXMLFile.java:30 ) Well the answer is: Don't insert the node where it isn't permitted. Change your generated directory file path from 'C' to other directory ex, D or to any directory you have. Make sure the ‘appendChild’ is referring to the right element. Don’t appending twice, only make it once. Ex, //Writetoxml.java   Element rootElement = doc . createElement ( " Company " );   doc . appendChild ( rootElement );                Element subElement = doc . cre

Do you want to know about your computer in one window screen?

System Toolbox (Sys Toolbox) If you want to know information about your computer from processor, drivers, motherboard, memory, operating system,...and more, you can depend on this software. Sys Toolbox (see screen shoot from the software) provides a software and hardware information for windows operating system. It is a simple software that you can use it to know about your PC. To run the software, you need to: Extract the zipped software.  After that, right click on the software icon and choose "Run as administrator". Finally, you will find a pop up screen telling you information about you PC. To go to the software site: http://sys-toolbox-pro.soft112.com/ To Download the software: Download