简体   繁体   English

在将Web应用程序保留在一个默认应用程序池中的情况下,拥有专用应用程序池的利弊

[英]Pros and cons of having dedicated application pools over keeping web applications in one default app pool

与将Web应用程序保留在一个默认应用程序池中相比,拥有专用应用程序池有何利弊?

Pros: 优点:

  • Applications are isolated from each other, unless IIS goes with it, an app pool locking will only take out applications in that pool 应用程序彼此隔离,除非IIS附带它,否则应用程序池锁定将仅取出该池中的应用程序
  • Ability to run applications under different ASP.NET runtimes, one pool for 1.1 another for 2.0 if needed 能够在不同的ASP.NET运行时下运行应用程序,一个池用于1.1,另一个池用于2.0(如果需要)
  • Ability to have different app pool settings for more or less critical applications. 能够为或多或少的关键应用程序提供不同的应用程序池设置。 For example a corporate website in ASP.NET might want to have the shut down after __ minutes of inactivity bumped up, to prevent unloading because response is critical. 例如,ASP.NET中的公司网站可能希望在__分钟的闲置时间增加后关闭,以防止由于响应至关重要而导致卸载。 Other sites might not need it. 其他站点可能不需要它。
  • Can secure pools from each other in regards to file access, great for third party, or untrusted applications as they can run under a very restrictive user account. 可以在文件访问方面确保彼此之间的安全,非常适合第三方或不受信任的应用程序,因为它们可以在非常严格的用户帐户下运行。

Cons: 缺点:

  • Each application pool has its own bank of memory and its own process, therefore CAN use more resources 每个应用程序池都有自己的内存库和进程,因此可以使用更多资源
  • Some find it hard to debug the application as you have multiple processes 有些人发现您有多个进程,因此很难调试应用程序

The primary reason for combining sites in app pools is to conserve memory. 在应用程序池中合并网站的主要原因是为了节省内存。 There's a large memory overhead in running several w3wp.exe processes. 运行多个w3wp.exe进程有很大的内存开销。 If you have no specific reason for splitting them up, it's better to keep them together. 如果没有具体的理由将它们分开,最好将它们放在一起。

Dedicated app pools typically will keep problems occurring in one site from effecting the others. 专用的应用程序池通常可以防止一个站点中发生的问题影响其他站点。 If you share app pools across sites, you could bring down all sites on the box when an error condition exists for only a specific site (or app pool). 如果您在站点之间共享应用程序池,则当仅特定站点(或应用程序池)存在错误情况时,可以关闭框中的所有站点。

Also, if you are mixing versions of ASP.Net on the same web server, you will need different app pools per ASP.Net version at a minimum, or do it per website. 另外,如果您在同一台Web服务器上混合使用多个ASP.Net版本,则每个ASP.Net版本至少需要不同的应用程序池,或者每个网站都需要。

I can't think of a good reason not to separate app pools, it is so easy to do. 我想不出不分离应用程序池的充分理由,这很容易做到。

I agree with Jason. 我同意杰森。

Also, you can designate different users (such as a Windows account) for different app pools. 另外,您可以为不同的应用程序池指定不同的用户(例如Windows帐户)。 That enables setting up those users with different permissions in the database. 这样就可以在数据库中设置具有不同权限的那些用户。 That helps enhance security, and enables tracking which website/user is hitting the database, useful when tracing database performance issues. 这有助于增强安全性,并允许跟踪哪个网站/用户正在访问数据库,这在跟踪数据库性能问题时很有用。

If you have separate apppools then you pay a penalty in the initial load time of the first person to visit your site and spin back up the apppool after it recycles. 如果您有单独的应用程序池,那么您会在第一个访问网站的人的初始加载时间中付出代价,并在应用程序池回收后重新启动它。

For example let's say overnight no-one hits your server, IIS will spin down (default 20mins I believe). 例如,假设一夜之间没人打您的服务器,IIS就会降速(我相信默认为20分钟)。 The first person to visit the server will suffer a delay until the your application has been loaded back into memory. 在您的应用程序重新加载到内存之前,第一个访问服务器的人将受到延迟。

Depending on how you deploy your site (eg release mode etc..) this will either not be a problem or could be annoying. 根据您部署站点的方式(例如发布模式等),这可能不是问题,也可能会很烦人。

This is why we are looking into moving to a single apppool/server rather than 1 for each site. 这就是为什么我们正在考虑迁移到单个apppool /服务器而不是每个站点1个的原因。

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

相关问题 在3层应用程序中具有中继器控件的优缺点是什么? - What are the pros and cons of having a repeater control in a 3-tier application? 多个SignalR集线器类型在一个背板上 - 优点/缺点/可扩展性? - Multiple SignalR hub types over one backplane — pros/cons/scalability? 更改Web应用程序项目的IIS 6应用程序池 - Changing IIS 6 Application Pools for a Web App Project iis中具有单独应用程序池的多个子Web应用程序 - Multiple child web applications with seperate app pools in iis 将CSS作为主题的一部分的利弊 - Pros and cons of having CSS as part of a theme HTTP.sys 与 Kestrel:为什么选择其中之一? 优点缺点? - HTTP.sys vs Kestrel: Why choose one over the other? Pros Cons? ASP 5 MVC 6 - 优点和缺点:多个Web api服务 - 使用一个或多个项目? - ASP 5 MVC 6 - Pros and cons: multiple web api services - use one or more projects? 在Web应用程序中选择静态和实例数据访问类的优缺点是什么? - What are the pros/cons of choosing between static and instance data access classes in a web app? 在MVC应用程序中使用Webmatrix.Database Helper的利弊 - Pros and Cons of using Webmatrix.Database Helper in MVC Applications 默认应用程序池崩溃和关闭是否会影响在同一服务器场/ IIS中运行的其他应用程序池? - Whether the Default App pool crashes and shut down will affect other App pools running in the same farm / IIS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM