Sunday, December 11, 2011

Multi Tenancy and Windows Azure. Overview of Multi tenant Application and Single tenant Application Architectural considerations.

Multitenancy is referred as important characteristics of all cloud application. There are many reasons why cloud applications today are being designed to support multi tenancy. Today I am going to discuss multi tenancy in cloud application (of course related to Windows Azure) based on the articles and posts I have gone through.
Wikipedia – Multi tenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple clients (or in other words “tenants”).
Dictionary meaning of “Tenant” say, people who take resources on lease. In Azure, we acting as a customer take cloud resources on lease therefore; customers or clients of application are referred as “Tenants”.
Single-Tenant vs Multi-Tenant applications –
Single Tenant Applications – Has a separate, logical instance of the application for each customer or client. For example, if there are 5 customers that require using the application then, we will have 5 different OS, 5 copies of database and 5 copies of the application. This is illustrated in following diagram –

Multi Tenant Application – Has a single, logical instance of the application which shared by many customers. For example, if there are 5 customers that require using the application then, we will have only 1 OS, 1 database, and 1 application serving all the clients.

In Windows Azure, one cannot stick to the multi tenant or single tenant application design. Any Azure application is made of multiple components; out of which some may be single tenanted or multi tenanted.
Following are the considerations which should be taken into account when you are planning to design multi tenant or single tenant application using windows Azure. The choice of design will depend on application requirements.
Application Stability – A multi tenant application is more vulnerable to system failures which can bring down entire application and affect the entire customers using it. In Single tenant, if one of the instance fails then only a particular customer is affected and rest of the whole system remain intact. This risk of multi tenant application can be overcome by increasing the instance count of an application. In such case the application will become, Multi Tenant – Multi Instance model.
Maintaining Code Base – If you are implementing single tenant architecture then you will have to maintain separate code base for each existing customer and new customers who joins your application. This will increase the support and maintenance cost rapidly. However it maintaining separate code base for each customer when they have different requirements will be good idea.
In case of multi tenant application, you need to maintain only one copy of code base which is easier and saves maintenance cost.
Handling Application Upgrades and Monitoring Applications – Applying application updates in case of multi tenant application will be easier and hence reduces maintenance efforts. All of the customer will receive the latest updates of your application. Also in case of single tenant application, user will have to maintain and monitor different versions of the same application.
Application Performance – Application performance in case of single tenant application will be always better as only one customer or tenant is using the application and there is no sharing of capacity (or resources) among multiple customers.
The application performance will be lesser in multi tenant application as compared to single tenant application. However, application performance can be tweaked in Windows Azure for multi tenant application using various Azure features and solutions.
Providing Trials – In case of single tenant application, you will need to provide separate application trial for every customer. Hence it will increase the maintenance complexity. In case of multi tenant application, provisioning trial will be easier task.
Managing Application Costs – In multi tenant application, all tenants will share the cost. Hence cost per tenant will be reduced as compared to single tenant application. So always strive to reduce the cost by sharing application with more and more tenants. But let sharing not affect adversely by reducing the application performance.
Conclusion - As a matter of fact, I will say that, when you need high degree of customization with every client then go for single tenant application. But make sure that, you limit your application to few components only.
When there is no customization per client then multi tenant application is always a good choice and it is cost saving solution.
Hope above information gives you basic idea about Azure multi tenant and single tenant application architectural considerations.
Cheers…
Happy Clouding!!!

4 comments:

  1. This risk of multi tenant application can be overcome by increasing the instance count of an application. In such case the application will become, Multi Tenant – Multi Instance model.

    Here even if we have multiple instances while upgrading the application with some new features all instances will recycle right? so how can we ensure other customers will not have downtime?

    ReplyDelete
    Replies
    1. Use update domain concept to keep at least an instance up while updating your app.

      Delete
  2. Hi,
    I've been following this post since a while and wanted to thank you for your excellent work.
    I may just ask you wither you have any "Audit SCOM Infrastructure Guide" or any kind of documentation related to auditing scom infra itself.

    Many thanks for your help.
    azure downtime

    ReplyDelete


  3. Hai Author, Very Good informative blog post,
    Thanks for Sharing

    ReplyDelete