问题描述
首先给你一点背景对当前的环境。我们有很多的ASP.NET应用程序,所有这些都使用会话的某些方面。我们是负载平衡在多个服务器,由于交通的水平,但是,我们的负载均衡器设置为使用粘性会话作为当前所有Web应用程序都设置为用是InProc会话状态。
First of all to give you a bit of background on the current environment. We have a number of ASP.NET applications, all of which use session for certain aspects. We are "Load Balanced" over multiple servers due to traffic levels, however, our load balancing is set to use "Sticky Sessions" as currently all web applications are set to use "InProc" for session state.
我们正由于我们的流量负载的服务器寻找能够消除对我们的负载均衡器的粘性会话的配置,如可以做超载。我们想要去一个更加平衡的方法,但必须能够使用会话。
We are looking at being able to remove the "Sticky Sessions" configuration on our load balancer, as due to our traffic loads servers can and do get overloaded. We want to go with a more balanced approach, but must be able to use session.
我知道SqlServer的会话状态会的工作,但我们无法控制的原因,我们不能使用SqlServer来存储状态。在研究似乎是的StateServer我们最好的选择。我们有一个额外的服务器配置,内存负载围坐。此服务器可能是我们对整个Web集群的StateServer。我们只是想知道下面的东西。
I know that SqlServer for session state will work, but for reasons beyond our control, we cannot use SqlServer to store our state. In researching it seems that StateServer is our best bet. We have an additional server, with loads of memory sitting around. This server could be our StateServer for the entire Web Cluster. We just want to know the following things.
1。)除了与InProc方式为StateServer开关任何潜在的序列化问题,还有与上述所列环境丢失会话对象或产生错误,任何重大的已知问题?
1.) Besides any potential serialization issues with the switch from InProc to StateServer, are there any major known issues with losing session objects or generating errors with the above listed environment?
2)除了故障和性能性能稍微慢的单点在那里,我们需要了解与使用的StateServer任何其他陷阱。
2.) Aside from the single point of failure, and slighly slower performance are there any other gotchas that we need to be aware of with using StateServer.
3)是否有显示三种状态存储?
3.) Are there any metrics that show the performance differences between the three types of state storage?
推荐答案
下面是asp.net状态像样的常见问题解答:http://www.eggheadcafe.com/articles/20021016.asp
Here is a decent FAQ on asp.net state: http://www.eggheadcafe.com/articles/20021016.asp
从这篇文章中,这里是一些的StateServer信息:
From that Article, here is some information on StateServer:
- 在一个Web场,请确保您有您所有的Web服务器相同的machineKey。请参见。
- 此外,还要确保你的对象是可序列。请参见。
- 对于会话状态在不同的Web服务器维护Web场中,网站的应用程序路径(例如\\ LM \\ W3SVC \\ 2)在IIS元数据库应该是在Web场中的所有Web服务器相同。详情请参见
- In a web farm, make sure you have the same MachineKey in all your web servers. See KB 313091 on how to do it.
- Also, make sure your objects are serializable. See KB 312112 for details.
- For session state to be maintained across different web servers in the web farm, the Application Path of the website (For example \LM\W3SVC\2) in the IIS Metabase should be identical in all the web servers in the web farm. See KB 325056 for details
这篇关于允许会话在Web农场?是的StateServer不够好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!