How to cluster Hazelcast instances?

How to run two Hazelcast instances on two different machines within the same cluster?

this is my configuration here

I want to know how we can configure multicast and TCP in the network element for testing high-availability. I tried searching in many articles but could not find any relevant configuration

Upvotes: 0

Views: 93

Answers (1)

Rafał Leszko
Rafał Leszko

Reputation: 5531

If you have two machines, with static IPs, then the simplest way is to use the TCP/IP configuration.

Assuming the IP addresses or your machines are: 1.2.3.4 and 5.6.7.8 and you use the default Hazelcast port 5701, you should have the following configuration:

<multicast enabled="false" />
<tcp-ip enabled="true">
    <member-list>
        <member>1.2.3.4</member>
        <member>5.6.7.8</member>
    </member-list>
</tcp-ip>

Upvotes: 1

Related Questions