哪个集群节点应该处于活动状态?
有一些集群和一些unix网络守护进程。该守护进程在每个集群节点上启动,但只有一个节点可以处于活动状态。
当活动守护进程中断时(无论节点的程序中断),其他节点应变为活动状态。
我能想到几种可能的算法,但我认为已经对此进行了一些研究,并且有一些现成的算法?我说得对吗?你能指出我的答案吗?
谢谢。
There is some cluster and there is some unix network daemon. This daemon is started on each cluster node, but only one can be active.
When active daemon breaks (whether program breaks of node breaks), other node should become active.
I could think of few possible algorithms, but I think there is some already done research on this and some ready-to-go algorithms? Am I right? Can you point me to the answer?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Jgroups 是一个 Java 网络堆栈,其中包括 DistributedLockManager 类型的支持和集群投票功能。这些允许任意数量的 UNIX 守护进程就谁应该处于活动状态达成一致。例如,所有节点都可能尝试获取锁,并且只有一个节点会成功,直到应用程序或节点失败。
Jgroups 还有特定通信通道协调器的概念。一次只有一个节点可以成为协调员,当一个节点发生故障时,另一个节点将成为协调员。测试您是否是协调员很简单,在这种情况下您将处于活动状态。
请参阅:http://www.jgroups.org/javadoc/org/ jgroups/blocks/DistributedLockManager.html
如果您要自己实现此功能,则需要记住很多内容:
Jgroups is a Java network stack which includes
DistributedLockManager
type of support and cluster voting capabilities. These allow any number of unix daemons to agree on who should be active. All of the nodes could be trying to obtain a lock (for example) and only one will succeed until the application or the node fails.Jgroups also have the concept of the coordinator of a specific communication channel. Only one node can be coordinator at one time and when a node fails, another node becomes coordinator. It is simple to test to see if you are the coordinator in which case you would be active.
See: http://www.jgroups.org/javadoc/org/jgroups/blocks/DistributedLockManager.html
If you are going to implement this yourself there is a bunch of stuff to keep in mind: