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.