关于如何处理 ejabberd 集群中的故障转移有什么建议吗?
上下文:
我的系统需要支持分布在 100 个聊天室中的 20,000 个联网聊天用户。在性能测试期间,我发现在获得故障转储之前,我可以在单个设备上获得最多 6,000 个连接的用户,因此在生产中我可能会在集群中使用四台服务器。
我的问题:
据我所知,聊天室绑定到服务器节点,因此,如果该节点死亡,聊天室也会随之消失,并且用户不再属于该房间。有没有办法将聊天室“复制”到另一个节点,以便留下的用户移动到复制的房间?如果没有,您如何保持用户的连续性?
Context:
I have a system that will need to support 20,000 connected chat users spread over 100 chat rooms. During performance testing I've found that I can get up to 6,000 connected users on a single box before I get a crash dump, so in production I'll probably go with four servers in a cluster.
My Question:
I understand that a chatroom is bound to a server node, so that if the node dies the chatroom disappears with it and the users no longer belong to the room. Is there a way to "replicate" a chatroom over to another node so that users who are left behind are moved to the replicated room? If not, what do you do to keep continuity for the users?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用什么硬件? 6000 个连接用户似乎有点少。另外,ejabberd 不应该在负载下崩溃。它可能会减慢速度,但不会崩溃。
您的设置有问题。
关于复制聊天室节点,这并不容易。最好在客户端处理平滑重连。
但话又说回来,ejabberd 不应该在这种负载下崩溃,除非出现问题。
What hardware are you using ? 6000 connected users seem a bit low. Also, ejabberd is not supposed to crash under load. It might slow down, but not crash.
There is something wrong in your setup.
About replicating a chatroom node, it's not easy. It's better to handle smooth reconnection on the client side.
But then again, ejabberd should not crash under this kind of load, unless something's wrong.