background preloader

Multi Tenant Architecture

Facebook Twitter

Multi-tenancy - Zack Owens. Multi Tenant Architecture with MVC 4 | I’ve been faced with a daunting challenge the last few months which is how to effectively create a multi-tenant architecture utilizing MVC 4. Creating an architecture like this can work several different ways depending on what you want to do. My particular project has a few goals. First, the application should support tenants as “sites”. The entire project is hosted on one IIS configuration with one application pool.

I’m not really going to get into the benefits of Multi-tenant architectures but one inherent benefit is that any number of sites can run on one code base. Second, I’m basically converting an existing project to be multi tenant. Third, I need a custom view engine to facilitate the view organization I desire. Handling Static Files You can also see I’ve restructured the /Content folder creating Global Folders for images and styles, then breaking out another Tenants folder for tenant specific resources. Storing the Tenant List in Memory Custom View Engine The Final Result. Multi-tenancy part 1: Strategy. I want my eCommerce application Suteki Shop to be able to flexibly meet the requirements of any customer (within reason).

How can we have a single product but enable our customers to have diverse implementations. I think the solution depends on the level of diversity and the number of customers. The right solution for a product with thousands of customers with little customisation is different from a solution for a handful of customers with very diverse requirements. There are several axis of change to consider: Codebase. Do I have one codebase, or do I maintain a separate codebase for each customer? Lots of customers, little customisation Lets consider the two extremes. In this case the main technical challenge will making sure that each user's data is keyed properly so they perceive it as a single application servicing their needs only. Scope for providing diverging customer requirements is very limited in this case. Few customers, Deep customisation So which one is Suteki Shop?