Question

What are the pros and cons of having a single site in IIS with multiple bindings or multiple sites with single bindings using the same code base? I'm interested particularly for Orchard multi tenancy where the code base is the same but the sites can have different functionality.

I'm curious if using one site with multiple bindings means that each tenancy in Orchard (or any application for that matter) would share the same Httpruntime cache or if each binding has its own Httpruntime cache. I'm guessing the earlier.

Kind regards

Était-ce utile?

La solution

Multiple sites in separate application pools are the only way to guarantee isolation. Anything else means there is a possibility that a piece of code in one application may be able to reach into another application's data. Cache is just one of many things that has to be shared.

It is however an expensive option: memory footprint is going to be more important, and you are going to have n applications to start, with the implied overhead for each one.

If you use multi-tenancy, there is only one application to start, and the memory footprint grows with the number of sites in a much more reasonable way (the footprint of an additional site is much smaller than the footprint of the first site). Each of the applications is also going to keep all of the others alive with each hit.

Multi-tenancy scales much better. Hosting thousands of sites on a single server is a possibility.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top