Windows Azure Multi Tenancy

I am starting a new enterprise web application. It will be hosted up on Windows Azure and will be an MVC application talking to an SQL database.

My question relates to multi-tenancy and the correct way to accomplish it. In the past I've created a multi-tenant application by having a tenant table and than putting a TenantID column in every table. This worked fine (but it was only on a smaller scale so it didn't really exercise it to the nth degree). Looking into the multi-tenant stuff on Azure, it doesn't seem to recommend this way. They talk about subdomain, splitting tenants etc. To me, that just seems like a management nightmare. I would like the user to hit a website, enter their tenant login details and boom they are off.

  1. Is there a simpler way to implement multi-tenancy in Azure that still allows me to use Azure's scalability strengths?
  2. Should I just use the simple TenantID method? Will the Azure framework still scale well to suit?
  3. Should I worry about tenancy at the start or just leave it till the end?

Advice needed.



I have done it both ways on Azure. I have done it the way you have done previously where they enter in a tenant code upon logging in and this works fine, I don't see any reason to do differently. You can use SQL Azure federations to manage the tenants so you can have multiple databases easily for scalability.

I have then also used the subdomains approach to identity the tenant, but all it did was map the subdomain to a tenant code. I used this in a system where they didn't have to log on so it was easier for the user.

Worry about it at the start if only to design the database to cope with it.

Need Your Help