Proper way to use Hazelcast on EC2?

67 views
Skip to first unread message

Allen Rohner

unread,
Apr 16, 2012, 8:53:07 PM4/16/12
to Hazelcast
I'm using Hazelcast on EC2. Currently, my cluster is about 5 nodes.
Several times an hour some nodes will join the cluster, and some nodes
will leave the cluster. Is this a supported configuration?

Are there any gotchas or special configuration I need to do?

Do I need to call Hazelcast.shutdownAll() when a box leaves the
cluster? What happens if I'm unable to, because the box is powered
off, etc.

Mehmet Dogan

unread,
Apr 17, 2012, 12:04:09 PM4/17/12
to haze...@googlegroups.com
You can add and remove nodes, there is no problem. But note that, every time a node joins or leaves Hazelcast tries to balance data among the cluster; if you have TBs of data, you may see some performance decrease on some nodes for a short period.

If you are using AWS join configuration, you should be able to add nodes seamlessly. We are doing our big data test on EC2.

You do not need to call shutdown, but it is the best way to inform others about removal. Normally other nodes can detect leave of a node, because by either shutdown hook or JVM termination, Hazelcast's socket closed properly. But in some cases, other nodes can not notice termination of connection. For example when you pull off network cable of a machine. You can see same behavior on EC2 since its network is not that much reliable. If the others can not notice the dead node immediately (which will occur when they do not receive socket close message), they will wait 'hazelcast.max.no.heartbeat.seconds' seconds (default 300 seconds) and then they will drop dead node from list.

@mmdogan





--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.


Reply all
Reply to author
Forward
0 new messages