Hazelcast: notify when a cluster node dies

梦想与她 提交于 2019-12-13 22:16:33

问题


I am quite a newbie to Hazelcast.
I'm building a cluster where different nodes take in charge different activities.
When a node dies, I'd like other nodes to notice, so they can reassign the dead node's activities among themselves. Is this possible? I have already made some research for this, but I couldn't find anything useful. Any help would be appreciated :)


回答1:


There are a number of ways here, probably the simplest for what you describe is http://docs.hazelcast.org/docs/3.8.5/javadoc/com/hazelcast/core/MembershipListener.html

However, you don't really want nodes dying in the first place, that's probably worth resolving.

Plus, it sounds like you're trying to manage workload placement yourself, simpler to let Hazelcast do it for you -- with for example with semaphores.



来源:https://stackoverflow.com/questions/46153963/hazelcast-notify-when-a-cluster-node-dies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!