SQLServer的VS的StateServer ASP.NET会话状态的性能 [英] SQLServer vs StateServer for ASP.NET Session State Performance

查看:536
本文介绍了SQLServer的VS的StateServer ASP.NET会话状态的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我学习了MS认证和实践的检验我在做的人有问题,其中争论的焦点是存储在SQL Server中的会话,而不是为StateServer之间的性能。

I'm studying for a MS certification and one of the practice tests I'm doing has a question where the point of contention is the performance between storing the session in SQL Server as opposed to StateServer.

是Web场,这对于会话状态的解决方案提供了最好的性能(SQL Server或的StateServer),最重要的是,在运行为什么?

Given the app is running in a web farm, which solution for session state gives the best performance (SQL Server or StateServer) and most importantly, why?

推荐答案

状态服务器速度更快,因为它存储在内存中的字典会话数据。因为它存储在数据持久化到磁盘上的数据库的SQL Server较慢。

State Server is faster because it stores session data in an in-memory dictionary. SQL Server is slower because it's stored in a database which persists data to disk.

SQL服务器也慢,因为一切都存储在一个表从而导致争随着越来越多的客户访问/更新会话数据。

SQL server is also slower because everything is stored in one table which leads to contention as more and more clients access/update the session data.

SQL服务器的更可靠的,因为它被保存在磁盘上,并且可以设置为与故障转移功能的群集。

SQL server is more reliable because it is persisted to disk and can be set up as a cluster with failover capability.

请参见一个深入的解释,这篇文章。

这篇关于SQLServer的VS的StateServer ASP.NET会话状态的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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