简体   繁体   English

在Java集群环境中管理会话数据的有效方法是什么?

[英]what's the effective way of managing session data in java clustering environment?

suppose we have an internet web site with high visits, say, 10M pv per day, 假设我们有一个访问量很高的互联网网站,例如每天访问量为1000万光伏,

say, 说,

  1. session sticky can not handle failover in a nice way, the users will be impacted; 会话粘性无法很好地处理故障转移,用户将受到影响;
  2. session replication may cause too much overhead, 会话复制可能会导致过多的开销,
  3. use some clustered cache server for storing actual session data and only do session replication for things like key (say, useid)? 使用某些群集缓存服务器存储实际的会话数据,并且仅对诸如密钥(例如useid)之类的内容进行会话复制吗?

I once asked someone in ebay and they say they use in memory mysql clustering for this. 我曾经在ebay上问过一个人,他们说他们为此在内存mysql群集中使用。 any good ways/best practice? 有什么好的方法/最佳实践吗?

In memory cluster is best option, see 在内存群集中是最佳选择,请参阅

http://www.mysql.com/products/cluster/features.html http://www.mysql.com/products/cluster/features.html

You can try using Terracotta Websessions 您可以尝试使用Terracotta Websessions

well, since it's surely not mean distribution, i do not have the data yet, but i'd expect it should at least handle 1000 dynamic request per second if possible 好吧,因为它肯定不是平均分布,所以我还没有数据,但是我希望它至少应该至少每秒处理1000个动态请求

It is possible to have bursts of this much activity, which is why I asked. 可能会有这么多活动突然爆发,这就是我问的原因。 The solution is different depending on what you believe the burst to be. 解决方案因您所认为的爆发而不同。 You can support 1K updates per second, with MySQL provided you have a fast disk (disk controller cached or SSD) 如果您拥有快速磁盘(磁盘控制器缓存或SSD),则可以每秒支持1K更新。

BTW: I have a library for a database which supports 200K - 20M updates per second on commodity hardware, but its not as easy to use, so you really need to need it. 顺便说一句:我有一个用于数据库的库,该库在商品硬件上每秒支持200K-20M更新,但是它不那么容易使用,因此您确实需要它。 ;) ;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用Java收集数据的有效方法是什么? - What is an effective way to collect data in Java? 在for循环中重用ArrayLists的有效方法是什么? - What's an effective way to reuse ArrayLists in a for loop? 编写Vaadin项目的有效方法是什么? - What's effective way to write Vaadin project ? 使用 Java 从另一台 postgres 服务器向 postgresql 服务器插入更多一百万行的有效方法是什么? - What's the effective way to insert more a million rows into postgresql server from another postgres server using Java? HTML 解析(在 Java/Android 中)然后从中提取数据,这是获取网页内容的有效方法吗? - Is HTML parsing (in Java/Android) then extracting data from it, an effective way of getting a webpage's content? 在Java中管理会话Cookie - Managing session cookies in Java 在Java Spring中管理会话 - Managing session in java spring 重构这个简单方法的最有效方法是什么? - What's the most effective way to refactor this simple method? 什么是从Java中的字符串读取字符的最佳和有效方法 - What is the best and effective way to read chars from string in java 最小化通过UDP传输数据的最有效方法是什么? - What is the most effective way to minimize data for transfer over UDP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM