2

I am starting a new enterprise web application. It will be hosted up on Windows Azure and will be an asp.net 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.

Thanks

1 Answer 1

1

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.

2
  • So SQL Azure federations will handle scaling out the database as size and traffic increases?
    – Matt
    Jul 12, 2012 at 7:00
  • Federations won't automatically scale but they give you the tools to do so easily. For example you can say from the management tools Tenant 1-10 go in one database, 11-20 in another and it will handle it for you.
    – Craig
    Jul 12, 2012 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.