Confusion about <interfaces> <multicast> and <tcp-ip>

2,502 views
Skip to first unread message

Bariscan Gungor

unread,
May 2, 2012, 2:57:58 AM5/2/12
to haze...@googlegroups.com
Hi all,

I have two different configuration peace that I demonstrated below. I am a bit confused about enabling/disabling multicast, tcp-ip and interface options combinations.
Which small peace of code belong to configuration is better / Which one should I prefer / What are the differences?

(PS: Both of the configurations works in development environment (standalone) with spring3-maven3 project during junit test. That's why I am confused actually. I cannot see the differences or hints that I should go for or against.)

Thanks in advance.
---------------------------------------------------------------------------------

First;
..
<network>
        <port auto-increment="true">5701</port>
        <join>
            <multicast enabled="false">
                <multicast-group>224.2.2.3</multicast-group>
                <multicast-port>54327</multicast-port>
            </multicast>
            <tcp-ip enabled="false">
                <interface>127.0.0.1</interface>
            </tcp-ip>
        </join>
        <interfaces enabled="true">
                <interface>192.168.24.*</interface> 
        </interfaces>
        ...
</network>

Second;
...
<network>
        <port auto-increment="true">5701</port>
        <join>
            <multicast enabled="false">
                <multicast-group>224.2.2.3</multicast-group>
                <multicast-port>54327</multicast-port>
            </multicast>
            <tcp-ip enabled="true">
                <interface>192.168.24.*</interface>
            </tcp-ip>
        </join>
        ..
</network>

Talip Ozturk

unread,
May 2, 2012, 3:10:20 AM5/2/12
to haze...@googlegroups.com
You have to check if multicast is supported in your production
environment. Talk to your system/network admin guys.

If multicast is supported then life is easier because there is no need
to maintain tcp/ip configuration. so simply use the following:
<network>
<port auto-increment="true">5701</port>
<join>
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="false">
<interface>127.0.0.1</interface>
</tcp-ip>
</join>
<interfaces enabled="true">
<interface>192.168.24.*</interface>
</interfaces>
...
</network>

notice that multicast is enabled and tcp-ip is disabled. we still need
<interfaces> so that Hazelcast binds to right IPs o each machine (for
more info:http://hazelcast.com/docs/2.0/manual/single_html/#ConfigSpecifyInterfaces).
If you go with multicast then we highly recommend using different
<multicast-group> IP for your production, development and test
clusters for clean separation.

If multicast is not enabled or not wanted then you will have to
disable multicast and enable tcp/ip. Your config then should look like
this:
<network>
<port auto-increment="true">5701</port>
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="true">
<interface>192.168.24.5</interface>
<interface>192.168.24.6</interface>
<interface>192.168.24.7</interface>
</tcp-ip>
</join>
<interfaces enabled="true">
<interface>192.168.24.*</interface>
</interfaces>
...
</network>

Notice that <tcp-ip> contains all known IP addresses where Hazelcast
will be running. And we still need <interfaces> so that Hazelcast
binds to the right IP set.


http://twitter.com/oztalip
> --
> 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.

Bariscan Gungor

unread,
May 2, 2012, 3:30:21 AM5/2/12
to haze...@googlegroups.com
Ok I'll go for multicast if it is possible. 

By the way I am working as a software engineer at eBay and it worths mentioning that we really use ( and love=) ) hazelcast for several projects that we have. Personally I would like to thank you at first, and your team as well for your interest and support. (Çok teşekkürler!)

Best regards,


2012/5/2 Talip Ozturk <ta...@hazelcast.com>

Talip Ozturk

unread,
May 2, 2012, 3:41:20 AM5/2/12
to haze...@googlegroups.com
Thanks! Happy to hear that eBay uses Hazelcast. Very cool indeed.

http://twitter.com/oztalip
Reply all
Reply to author
Forward
0 new messages