ASP.Net使用状态服务器和缓存增加MaxProcesses(Web园) [英] ASP.Net increase MaxProcesses (web garden) using state server and caching

查看:178
本文介绍了ASP.Net使用状态服务器和缓存增加MaxProcesses(Web园)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS7上有一个ASP.Net网站,我计划增加MaxProcesses以匹配服务器上的核心数(4核,64位Windows Server 2008)。

I have an ASP.Net website on IIS7 and I am planing to increase the MaxProcesses to match the number of cores on the server (4 cores, 64bit Windows Server 2008).

根据我的阅读,如果我增加MaxProcesses来创建一个Web园,我必须设置一个进程外状态服务器,所以我计划使用ASPState服务来共享工作进程之间的会话。

From what I read, if I increase the MaxProcesses to create a web garden I have to set an out-of-process state server, so I am planing to use the ASPState service to share sessions between worker processes.

但有些事情我不清楚,缓存是否也分享了?或者我是否必须为缓存设置新的自定义提供程序?

But there is something that is not clear to me, is Caching also shared? Or do I have to set a new custom provider for the cache?

推荐答案

进程内缓存永远不会在Web园中共享。

In-process cache is never shared in a web garden.

但这是真实的事情......我质疑你正在做的事情背后的动机。如果对象是更有效地使用核心,那么您可以增加运行ASP.NET应用程序的请求和/或工作线程的数量。运行多个w3wp进程不一定是您想要的选项。如果你有一些受限制的资源,比如一个旧的进程内COM对象,它与线程的扩展性很差,那么我可以看到你如何通过多个进程更好地扩展。但除非你真的知道自己在做什么以及为什么要这样做,否则请从该设置中轻轻退一步,并将其保留为1.; - )

But here's the REAL thing... I question the motivations behind what you're doing. If the object is to use your cores more efficiently, then you can just increase the number of request and/or worker threads you have running your ASP.NET application. Running multiple w3wp processes isn't necessarily the option you want. If you have some constrained resource, like an old in-process COM object that scales poorly with threads, then I can see how you might scale better with multiple processes. But unless you really know what you're doing and why, gently step back from that setting and leave it at 1. ;-)

这篇关于ASP.Net使用状态服务器和缓存增加MaxProcesses(Web园)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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