且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQLServer 与 StateServer 的 ASP.NET 会话状态性能

更新时间:2023-02-05 20:52:23

State Server 速度更快,因为它将会话数据存储在内存字典中.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 Server 也较慢,因为所有内容都存储在一个表中,随着越来越多的客户端访问/更新会话数据,这会导致争用.

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.

请参阅这篇文章中的序言以获取深入的解释.

See the preamble in this article for an indepth explanation.