Using Multicast for cluster communications

WebLogic can also use Multicast for cluster communications.

When configured for using Multicast, the Managed Servers of the cluster subscribe to a Multicast address and port and listen for heartbeats and cluster messages. Unlike Unicast, Multicast communication uses UDP and broadcasts the message through the network and therefore does not guarantee that the message is received.

Getting ready

To configure Multicast, the Administration Server must be running.

How to do it...

To configure the Multicast communication for the cluster:

  1. Access the Administration Console with your web browser at http://prod01.domain.local:7001/console.
  2. Click on the Lock & Edit button to start a new edit session.
  3. Expand the Environment tree on the left and click on Clusters.
  4. Click on the PROD_Cluster cluster to navigate to Configuration | General and click on the Messaging tab to navigate to Configuration | Messaging.
  5. Change the Messaging Mode drop-down menu to Multicast. Configure the Multicast Address value to 239.192.0.0 and the Multicast Port to 7001 (as shown in the following screenshot):
  6. Click on the Save button and then on the Activate Changes button.
  7. Restart all Managed Servers of the PROD_Cluster cluster.

How it works...

Multicast includes additional configuration at the networking and operational system level.

Multicast Address 239.192.0.0 and Multicast Port 7001 are the default values. The range from 224.0.0.0 to 239.255.255.255 can be used. Do not use an address within the x.0.0.1 range where x is between 0 and 9.

Tip

Don't use two clusters with the same Multicast address in the same network or they will conflict.

There's more...

The Multicast can also be configured through WLST.

Configuring Multicast using WLST
  1. Log in as a wls user to shell and start WLST:
    [wls@prod01]$ $WL_HOME/common/bin/wlst.sh 
    
  2. Connect to the Administration Server using wlsadmin as the user, <pwd> as the password, and t3://prod01.domain.local:7001 as the server URL:
    wls:/offline> connect("wlsadmin","<pwd>","t3://prod01.domain.local:7001")
    
  3. Run the following WLST commands to create the cluster and the server instances:
    edit()
    startEdit()
    
    cd('/Clusters/PROD_Cluster')
    cmo.setClusterMessagingMode('multicast')
    cmo.setMulticastPort(7001)
    cmo.setMulticastAddress('239.192.0.0')
    
    activate()
    exit()
    

See also

  • Configuring HA WebLogic cluster parameters
  • Using Unicast for cluster communications