How do you programmatically configure hazelcast for the multicast discovery mechanism?

后端 未结 7 1257
-上瘾入骨i
-上瘾入骨i 2020-12-05 13:37

How do you programmatically configure hazelcast for the multicast discovery mechanism?


Details:

The documentation only supplies an example for TCP/IP

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 14:36

    Your configuration is correct BUT you have set a very long multicast timeout of 200 sec where the default is 2 sec. setting a smaller value will solve it.

    From Hazelcast Java API Doc: MulticastConfig.html#setMulticastTimeoutSeconds(int)

    Specifies the time in seconds that a node should wait for a valid multicast response from another node running in the network before declaring itself as master node and creating its own cluster. This applies only to the startup of nodes where no master has been assigned yet. If you specify a high value, e.g. 60 seconds, it means until a master is selected, each node is going to wait 60 seconds before continuing, so be careful with providing a high value. If the value is set too low, it might be that nodes are giving up too early and will create their own cluster.

提交回复
热议问题