本文介绍了ASP.NET会话状态服务器与InProc会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是运行会话状态服务器,而不是是InProc开销性能损失?它是显著?我明白,你可以重新启动W3WP与状态服务器,并保留所有会话状态 - 是在InProc方式唯一的好处

What is the overhead performance penalty for running Session State Server instead of InProc? Is it significant? I understand that you can restart w3wp with the state server and retain all session state - is that the only advantage over InProc?

推荐答案

这取决于你的部署计划:一台服务器上,刑罚虽小,但好处是同样的限制:你的会话状态生存进程回收(如前所述),但仅此而已。您将有一些交叉进程StateServer模式编组,所以我们期待一些额外的CPU负载,没有什么太IM pressive。

It depends on your deployment plans: on a single server, the penalty is small, but the benefit is equally limited: your session state survives process recycles (as mentioned) but that's about it. You'll have some cross process marshalling with StateServer mode, so expect some additional cpu load, nothing too impressive.

在一个Web农场/负载均衡设置是InProc将无法正常工作,除非你可以配置粘性会话/服务器关系。要留意的事实的StateServer节点本身可以​​成为单一故障点,所以一定要弥补这一点。话虽如此,一个的StateServer的等待时间一般要少得多(=优于)当您使用SQLServer模式。

In a web farm/load balanced setup InProc won't work, unless you can configure sticky sessions/server affinity. Be mindful of the fact that the StateServer node itself can become a single point of failure, so be sure to compensate for that. Having said that, the latency of a StateServer is in general much less (= better) than when you use SQLServer mode.

请确保您的code /网站轻松应对失去状态,无论你在哪里存储数据的。

Make sure that your code/site gracefully handles lost state, regardless of where you store the data.

这篇关于ASP.NET会话状态服务器与InProc会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 16:01