简体   繁体   English

IIS,多个站点或多个绑定

[英]IIS, Multiple sites or multiple bindings

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? 在IIS中使用相同代码库在单个站点中具有多个绑定或在单个站点中具有多个站点的优缺点是什么? I'm interested particularly for Orchard multi tenancy where the code base is the same but the sites can have different functionality. 我对Orchard多租户特别感兴趣,因为它的代码库是相同的,但是站点可以具有不同的功能。

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. 我很好奇,如果将一个站点与多个绑定一起使用意味着Orchard(或与此相关的任何应用程序)中的每个租户将共享相同的Httpruntime缓存,或者每个绑定都具有自己的Httpruntime缓存。 I'm guessing the earlier. 我猜是较早的。

Kind regards 亲切的问候

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. 但是,这是一个昂贵的选择:内存占用空间将变得更加重要,并且您将要启动n个应用程序,每个应用程序都会隐含开销。

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. 可以在一台服务器上托管数千个站点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM