Ejabberd聚类理解 [英] Ejabberd Clustering understanding

查看:110
本文介绍了Ejabberd聚类理解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有两个ejabberd服务器考虑 X Y 它具有相同的来源,我通过使用。现在考虑 A B 是用户,那些在 X服务器。 A和B都在 ONLINE 状态,那些通过 X服务器连接。如果假设X服务器在某些问题上得到 shutdown 崩溃。在这个sceneraio中, A B 是否得到 OFFLINE 状态或 A B ONLINE 状态处理由 Y 服务器。我不知道我的想法是否对。

解决方案

负载平衡不是您在问题中所描述的那样。 / p>

在负载平衡中,传入连接以均衡的方式分布在多个节点上。这样就没有一个服务器的负载太高(因此名称为负载平衡)。如果您的负载平衡器足够聪明以检测和删除死点,则它还提供故障切换功能。



智能负载平衡器可以使其更改为<只要集群中至少有一个工作节点,连接总是成功。但是,在您的问题中,您会谈论客户端维护连接。这是一个完全不同的东西。



要做到这一点,您需要将连接设置为无状态,或者需要每个客户端连接到所有节点。这不是XMPP的工作原理:它是与单个服务器的有状态连接。您必须依靠客户端重新连接。


Let assume I have two ejabberd server consider X and Y which has the same source and i did ejabberd clustering for those server by using this. Now consider A and B are user and those are connected in X server. Both A and B are in ONLINE state and those are connected via X server. If suppose X server is get shutdown or crashed by some issue. In this sceneraio whether the A and B are get OFFLINE state or A and B are in ONLINE state which is handle by Y server. I don't know whether my thought is right or not. If any one give me the suggestion about it.

解决方案

"Load balancing" is not what you are describing in your question.

In load balancing, a incoming connections are distributed in a balanced fashion over multiple nodes. This is so that no one server has too high a load (hence the name "load balancing"). It also provides fail-over capability if your load balancer is smart enough to detect and remove dead nodes.

A smart load balancer can make it so that new connections always succeed as long as there is at least one working node in your cluster. However, in your question, you talk about clients "maintaining the connection". That's something quite different.

To do that, you'd either need the connection to be stateless or you'd need each client to connect to all nodes. That's not how XMPP works: it's a stateful connection to a single server. You must rely on your clients to reconnect if they get disconnected.

这篇关于Ejabberd聚类理解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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