Cloud and Multitenant Architecture: Understanding the difference and Usage


Many times I see people combining the terms Multitenant with Cloud and vice a versa. Looks like there is a confusion or misperception on how these two things work together. One thing we need to understand that if I develop any application which can be deployed in cloud doesn’t automatically means that the application is multitenant. At the same time if I develop any application which is multitenant doesn’t automatically means that it can be deployed on cloud.

So first lets understand what exactly these two things means before going into how these two complements each other.

Cloud: Cloud provides a readymade infrastructure to host your application along with the ability to increase / decrease the hardware resource requirement based on the requirement. Also there are multiple vendors providing this infrastructure and we have to very careful in choosing them (we should not get confused with Hosting Provider).

Some of these providers are:

  • Microsoft Azure
  • Google Apps
  • Force Platform (from Salesforce)

Now many of these platforms provide good support for specific languages. If you are on Microsoft stack then Azure will be your best bet (please note that Azure supports PHP, Java, Python etc. too).

Multitenant Architecture:  Multitenant architecture is needed when we develop any software to handle a domain requirement which is applicable to multiple customers. In that situation the configurability of the software is more important than customizing of the software (in some cases it cannot be avoided but needs to be handled differently). Majority of the time a single codebase provides services to all the customers. And at application and data storage level, care is taken to make sure that data from Customer A is fully secured from Data from Customer B. Also if there is requirement for any customization for a particular customer, there are patterns to handle this.

Some of the examples of Multitenant Applications:

  • SharePoint Online
  • 37 Signals Applications
  • Accompa for Requirements

Many people talk about Multitenancy feature of SharePoint 2010. We need to understand that it’s the SharePoint 2010 software itself which has been made multitenant in order to make the job easy for Hosters who provides SharePoint 2010 installation on Hosting Servers. If we develop any software on SharePoint 2010, no doubt we will get many help from the infrastructure itself, but again we need to build our application according to that.

As far as Multitenant Architecture is concerned, this itself is a BIG topic for which we will find many resources on the web which talk about multitenancy at database level, code level etc. The idea of this blog is not to explain what is the best approach to achieve multitenancy. The idea of this blog to make sure that we understand the difference between Multitenancy and Cloud.

Usage: Now the question is how these two complements each other. Now we understand that multitenant architecture is to support multiple customers with the single codebase and data structure. Which means that it doesn’t matter if the customer count grows from 10 to 100 as our application can support it any time. However the questions is what about hardware infrastructure. This is where the elastic nature of the cloud comes into the picture and provide the necessary infrastructure which is required for scaling of the business.

E.g. In Azure just by changing the configuration file we can change the number of instance of our application hosted in the cloud. At the same time if the business is not doing good we can very well reduce the resource usage and pay as per the requirement. This is certainly not possible if we are hosting all these infrastructure all by our self. Also these infrastructure are maintained in state of the art data centers with 99.99 % uptime SLA.

I guess people will find this information useful. I will keep adding to this post. In the mean time if anyone has any suggestions feel free to post in the comment.