Friday, 5 December 2014

Differences between Unicast and multicast?

Differences between Unicast and multicast?

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 are required. Unicast does not have this requirement, which is why using unicast in the 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 to the cluster throwing the server instances out of the cluster.
Unicast configuration is much easier because it does not require the 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, the 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 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.



Difference between .out and .log files

Difference between .out and .log files

.out will print all logs related to your java application deployed whereas
 .log file will print all logs related to WebLogic server like a startup. stop, deployment, etc...

.out will have standard shell output where the instance was started and it will have mostly
 Notice and above log level will be written on it. .log will have the server logs along with
 all subsystem logs too.

Java application will write logs on .out only if the app code redirects .logs to standard output,
 there are many logging mechanisms are available like loc4j which can be used to
 write the java application logs to different/ separate files.