ASP.NET会话 - 使用或不适合电子商务的应用程序使用和最佳实践或不、应用程序、适合、电子商务

2023-09-04 01:18:22 作者:一笔一画、勾勒幸福〆

我已经使用了ASP.NET大多在Intranet方案和pretty的熟悉,但是对于一些如购物车或类似的会话数据有多种可能性。仅举几例:

I have used ASP.NET in mostly intranet scenarios and pretty familiar with it but for something such as shopping cart or similar session data there are various possibilities. To name a few:

1)国家服务器会话

2)SQL Server会话

2) SQL Server session

3)自定义的数据库会话

3) Custom database session

4)的Cookie

4) Cookie

你有什么用,什么我们你的成功或教训的故事和你有什么建议?这显然​​使一个大型公共网站上的差异,所以请对您的经验发表评论。

What have you used and what our your success or lessons learnt stories and what would you recommend? This would obviously make a difference in a large-scale public website so please comment on your experiences.

我没有提到的的进程内,因为在一个大型的应用程序这并没有什么地方。

I have not mentioned in-proc since in a large-scale app this has no place.

非常感谢 阿里

推荐答案

在进程内一定可以在一个大规模应用的地方;它只是需要在负载均衡的水平粘性会话。实际上,降低了维修费用和基础结构的开销通过使用进程内的会话可以是相当大的。任何企业级内容切换你会用你的农场一定会提供这样的功能的面前,这是很难说的现金和购买/配置/整合状态的服务器相比只是扳动开关人力。我在相当大的缩放ASP.NET系统使用本没有问题可言。 RAM是太便宜忽略这个作为一个选项。

In-proc certainly can have a place in a large-scale application; it just requires sticky sessions at the load balancing level. In fact, the reduced maintenance cost and infrastructure overhead by using in-proc sessions can be considerable. Any enterprise-grade content switch you'd be using in front of your farm would certainly offer such functionality, and it's hard to argue for the cash and manpower of purchasing/configuring/integrating state servers versus just flipping a switch. I am using this in quite large scaled ASP.NET systems with no issues to speak of. RAM is far too cheap to ignore this as an option.