I've a very simple setup of only two nodes, using hazelcast 3.2.5. The startup time for the first node is ~3 seconds and the second node starts in roughly 10 sec using only getTcpIpConfig. I've tried to improve the startup time via
System.setProperty("hazelcast.local.localAddress", "127.0.0.1");
as suggested here but nothing improved. Then I tried:
System.setProperty(GroupProperties.PROP_WAIT_SECONDS_BEFORE_JOIN, "1");
and this reduces start time of 2nd node to 6 seconds.
Here is my config for both nodes:
Config cfg = new Config();
NetworkConfig nCfg = cfg.getNetworkConfig();
nCfg.getJoin().getMulticastConfig().
setEnabled(false);
nCfg.getJoin().getAwsConfig().
setEnabled(false);
nCfg.getJoin().getTcpIpConfig().
setConnectionTimeoutSeconds(5).
addMember("127.0.0.1:5701,127.0.0.1:5702").
setEnabled(true);
The most time is spent at SocketConnector (0.5s), TcpIpConnectionManager (2.5s) and ClusterService (2s) and elsewhere.
I would like to have both startup times down to lower than 3. Is this possible somehow?
If not, can I somehow startup the node, with only loading the data from DB and joining the cluster afterwards?
My current solution probably makes the most sense: separating hazelcast service from my own service and using the native Java client. With this startup is lower than 2sec.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With