multicast Archive

Comparison Between Cluster Multicast Messaging and Unicast Messaging Mode

When servers are in a cluster, these member servers communicate with each other by sending heartbeats and indicating that they are alive. For this communication between the servers, either unicast or multicast messaging is used. This is chosen from the admin console in Cluster -> Configuration -> Messaging -> Messaging Mode.

To use multicast messaging, hardware configuration and support for multicast packets is required. Unicast does not have this requirement, which is why using unicast in latest versions is recommended.

When multicast messaging is used, it is a one-to-many communication, every server sends the notification/heartbeat/multicast packet to each other. This causes a heavy load on the application’s multicast buffer, so if the buffer is full, new multicast messages cannot be written to the buffer and the application is not notified when messages are dropped. So there is a possibility that the server instances miss the messages. This might lead in the cluster throwing out the server instances out of the cluster.

Unicast configuration is much easier because it does not require cross network configuration that multicast requires. Additionally, it reduces potential network errors that can occur from multicast address conflicts.

Mode of Communication:
Multicast – A multicast address and multicast port is used for listening to the messages.

Unicast – A network channel is used for communication between the servers. If no channel is specified, default network channel is used.


Method of communication between servers:
Multicast – Each server communicates with every member server in the cluster. Which means heartbeats are sent to every server.

Unicast – For the member servers in the cluster, group leaders are chosen and only those group leaders communicate with the servers among the group and these leaders notify each other about the availability of all the other servers.
For example : Suppose there are 6 servers in the cluster. 2 groups are made and there are 2 group leaders. Other 2 servers of the group will notify their leader that they are alive and the group leader will send this information to the leader of other group.

The frequency of communication in unicast mode is similar to the frequency of sending messages on multicast port.


For new server versions, using unicast is recommended because it is a simplified communication mode. But for backward compatibility with the previous versions, you will need to use multicast if there is a communication requirement between clusters of versions prior to WLS 10.0.

Whenever the messaging mode of the cluster is changed, all the servers in the cluster need a restart because the changes are not dynamic.

If you have any questions regarding unicast and multicast messaging mode, please let us know about it.

Best Regards,
Wonders Team!

Multicast Test On The Network

When you have servers in one cluster, the servers communicate with each other using multicast messaging mode. But a lot of times you see the messages in the log files of the servers like “Lost Multicast Messages”. This means there is something wrong in the servers communication. At this point of time it is necessary to test the network connection between the ip addresses where the clusters are running.

Syntax : java utils.MulticastTest -n name -a address [-p portnumber] [-t timeout] [-s send]

-N : Name of the server so that you can identify the communication.
-A : Multicast address on which the messages are sent and received.
-P : This is the multicast port number on which the servers communicate.
-T : This is the timeout value, if no multicase message is received within this time, warning is shown on the shell prompt.
-S : The duration in seconds between sending the messages.

Below is how you do it:

Test :  Start the command prompts on machines where you have your managed servers. (can be 1 or more)
Ensure that the servers in the cluster are not running, this test is for checking the network connectivity.

Set the java environment on both the shells. Then enter the below syntax:
System 1 : java utils.MulticastTest -N Server1 -A -P 7008 -T 10 -S 2
System 2 : java utils.MulticastTest -N Server2 -A -P 7008 -T 10 -S 2

Both servers will start sending and receiving messages as below:

Server 1 :

Server 2 :

The screen shots show that there is no issue in the connectivity. But when there is a lost message, it will show the message:

Received message 142 from Server1
Received message 134 from Server2
I (Server1) sent message num 143
Received message 143 from Server1
Missed message for Server2?  Last Seq 134 and just received 136
I (Server1) sent message num 144
Received message 144 from Server1
Received message 137 from Server2
I (Server1) sent message num 145
Received message 145 from Server1
Received message 138 from Server2
I (Server1) sent message num 146
Received message 146 from Server1
Received message 139 from Server2
Missed message for Server2?  Last Seq 139 and just received 141
I (Server1) sent message num 147
Received message 147 from Server1
Received message 142 from Server2
I (Server1) sent message num 148

This means message number 135 and 140 are lost by server2. In this situation, you know there is an issue. Check with the network administrator on what went wrong.

If you need any clarifications on the test, please do let us know.

Best Regards.