JGroups Message Instances

I have two machines running JGroups. The problem that I encountered is when instances are created on one of the machines, after a few seconds I start other instances. Both of them initiate separatism (the same cluster), and they do not join the cluster together. After 10-15 seconds, they communicate and unite.

This delay causes a problem with my business in the code ... There is also a warning thrown when the program starts

WARNING: send socket buffer java.net.MulticastSocket@5954864a was set to 640 KB, but only 135.17 KB was allocated for the OS. This can lead to performance issues. Set the correct send buffer on the OS (e.g. net.core.wmem_max on Linux)

Does this have something to do with the problem?

+4
source share
3 answers

You absolutely need to increase these values ​​- otherwise UNICAST is almost unusable.

If you are familiar with how to do this, modify the /etc/sysctl.conf file. These are my values ​​on my nodes.

UDP JGroups Configuration

net.core.rmem_max = 25480000

net.core.wmem_max = 25480000

To reload these values, output "sysctl -p" as root to force this file to reload.

Source: http://comments.gmane.org/gmane.comp.java.javagroups.general/7922

+3
source

The warning is not related to your problem, it can only lead to performance problems, since the OS buffer is small for your multicast buffer.

Regarding your problem: check your log for all group messages (not just warnings) and check their timings. Submit your cluster configuration.

+1
source

Edit / etc / sysctl.conf by changing this value (net.core.wmem_max) and run "sysctl -p"

+1
source

All Articles