回顾为每个网站/应用程序创建单独的IIS应用程序池 [英] Drawback to creating a separate IIS application pool for each website / application

查看:138
本文介绍了回顾为每个网站/应用程序创建单独的IIS应用程序池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,在我们的生产IIS Web场中,我们在一个应用程序池(默认应用程序池)中托管了大约15个应用程序。有两个网站和大约13个虚拟目录。



一位同事建议我们更改我们的IIS配置,以便每个应用程序都是一个单独的应用程序池(具有相同的设置)。 / p>

这样做有任何缺点或潜在问题吗?
是否有可能构建ASP.NET应用程序,它们都在同一个应用程序池中?

解决方案

我怀疑他们是否考虑到了这个要求,除非他们出于某种原因依赖共享内存。否则,对于描述的场景...



优点(独立应用池):




  • 流程隔离(一次崩溃不会导致其他崩溃)

  • 减少资源争用

  • 更多可用于进程内会话的内存,缓存



缺点:




  • 更多进程,内存和上下文切换

  • 共享缓存方案不再可用*



*我不确定.NET如何隔离与 HttpRuntime 缓存相关的同一应用程序池中的网站;对于会话,应用程序唯一性(1)由以下因素确定:




  • 所有服务器上的物理路径(区分大小写)

  • 机器密钥

  • 实例ID

  • 批准



这就是阻止您在同一个应用程序池中跨不同网站共享会话的原因;但是,共享缓存数据可能更容易。总的来说,讨论与为特定应用程序部署 Web Garden 的优缺点重叠(2)。



1)

http://support.microsoft.com/?id=325056
$
http://rodiniz.spaces.live.com/blog/cns!F2A56AAF89A7E43A!658.entry



2)
$
http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/


Currently, on our production IIS web farm, we host about 15 applications in a single App Pool (Default App Pool). There are two websites and about 13 virtual directories.

A colleague has recommended that we change our IIS configuration so each application is a separate App Pool (with identical settings).

Is there any drawback or potential issues to doing this? Is it possible that ASP.NET applications could have been built with the requirements that they are all within the same App Pool?

解决方案

I doubt they were built with that requirement in mind unless they rely on shared memory for some reason. Otherwise, for the scenario described...

Pros (of separate app pool):

  • process isolation (one crash doesn't bring down the others)
  • less resource contention
  • more memory available for in-proc sessions, cache

Cons:

  • more processes, memory, and context switchces
  • shared cache scenarios no longer available*

*I'm not sure how .NET segregates websites in the same app pool as it pertains to the HttpRuntime cache; for Sessions, "application uniqueness" (1) is determined by:

  • The physical path on all servers (case sensitive)
  • The machine key
  • The instance id
  • The approot

This is what prevents you from sharing sessions across different websites in the same app pool, for instance; but it might be easier to share cache data though. By and large, the discussion overlaps with the pros/cons of deploying a Web Garden for a specific application (2).

1)
http://support.microsoft.com/?id=325056
http://rodiniz.spaces.live.com/blog/cns!F2A56AAF89A7E43A!658.entry

2)
http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/

这篇关于回顾为每个网站/应用程序创建单独的IIS应用程序池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆