[英]Pros and cons of having dedicated application pools over keeping web applications in one default app pool
与将Web应用程序保留在一个默认应用程序池中相比,拥有专用应用程序池有何利弊?
Pros: 优点:
Cons: 缺点:
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.