JGroups in a pure multicast network

4 views
Skip to first unread message

Anton Gerdessen

unread,
Sep 9, 2025, 12:08:24 PMSep 9
to jgroups-dev
Hi, is it possible to force JGroups to use multicast only?

I'm trying to limit the port usage and restrict any unicast in a network.
The reasons for this is a network with tunnels and multicast exemptions.

I got most working using multicast, but it seems the final message to join a group (being send by 'pbcast.GMS' I think) is between individual cluster members, unicast UDP.

Is there any more I can do?
Some documentation suggests use_mcast on GMS but I think this has been removed a long time ago.

Any help is more than welcome.

I use the following configuration:

<config xmlns="urn:org:jgroups"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">

<UDP

bind_addr="match-address:192.168.*"

bind_port="45677"

mcast_addr="239.8.8.8"

mcast_port="45678"

mcast_send_buf_size="210K"

thread_pool.min_threads="0"

thread_pool.max_threads="200"

thread_pool.keep_alive_time="30s" /> <!-- multicast for transfer, bind to the ETH network (192.168.*) address, not the tunnels -->

<MPING

bind_addr="match-address:192.168.*"

mcast_addr="239.8.8.7"

mcast_port="45678"/> <!-- Use ping for member discovery -->

<MERGE3

max_interval="5s"

min_interval="3s" /> <!-- merge JGroups if they segment, ensure this timer is below the verify timer -->

<FD_ALL3

interval="3s"

timeout="30s"/> <!-- How long until we consider a member 'gone' -->

<BARRIER /> <!-- Barrier for transmission, used in conjunction with flow control -->

<pbcast.NAKACK2

xmit_interval="0.5s"

use_mcast_xmit="true"

use_mcast_xmit_req="true" /> <!-- NAKACK2 ensure in sequence delivery. NAKACK4 can cause drops, NAKACK2 does not -->

<pbcast.STABLE

max_bytes="15M" /> <!-- Detection if all members have received a message a drop received by all -->

<pbcast.GMS

join_timeout="1s" /> <!-- How group members are discovered -->

<MFC

max_credits="50M"

min_threshold="0.4" /> <!-- Multicast Flow control -->

<UFC

max_credits="50M"

min_threshold="0.4" /> <!-- Unicast Flow control -->

<FRAG2

frag_size="60K" /> <!-- Fragment UDP packets -->

<pbcast.STATE_TRANSFER /> <!-- Transferal of state of the entire cluster -->

</config>

Bela Ban

unread,
Sep 9, 2025, 12:29:12 PMSep 9
to jgrou...@googlegroups.com
This should be possible by writing a protocol, which does the following:

* When a unicast message is sent (in down()) and msg.dest != null: copy it, set the destination to null, add the real destination to a header HDR

* When a message is received (in up()) and it has a header HH: copy it and set msg.dest to HDR.dest
* When a message batch is received (in up()): do the same for every message

The protocol should be placed just above UDP.
--
You received this message because you are subscribed to the Google Groups "jgroups-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jgroups-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jgroups-dev/7b0ad665-a3f6-4c88-bc6c-522d90be1211n%40googlegroups.com.

-- 
Bela Ban | http://www.jgroups.org

Anton Gerdessen

unread,
Sep 9, 2025, 2:26:36 PMSep 9
to jgroups-dev
Hello,

Is there an example somewhere about writing a protocol and registering it?
All I can find is this:

Bela Ban

unread,
Sep 9, 2025, 4:46:19 PMSep 9
to jgrou...@googlegroups.com
The link you posted below is very old, but still describes the details of writing a protocol. I suggest copy an existing protocol, such as PERF, and start modifying it to your liking.
Perhaps someone on the list is willing to help? I might be able to help towards the end of this month if I find the time

Cheers
Reply all
Reply to author
Forward
0 new messages