Sun GlassFish Communications Server 1.5 Quick Start Guide

Setting Up a Cluster with Converged Load Balancer

This section explains how to create a cluster that contains two Communications Server instances and describes how to use the converged load balancer, which is available out-of-the-box with a Communications Server installation. This section assumes that you have installed Communications Server with clustering.

ProcedureTo Set Up a Cluster with Converged Load Balancer

This procedure creates the sample cluster one the same host on which the DAS is running.

Before You Begin

It is assumed that you have already started the node agent. When you specify instances during cluster creation, associate the instance with a running node agent for the machine on which you want the instance to run. If the node agent is not running, the instance will not start. Node agent and instance names must be unique across clusters that are created in a domain.

  1. Log in to the Administration Console at http:// hostname:portnumber if you have not already done so.

    Replace the hostname variable with the name of the system that the Domain Administration Server is running on. Replace portnumber with the port number of the cluster domain, domain1.

  2. On the left pane, click the Clusters tab.

  3. Communications Server installation creates a default cluster called default-cluster, which is associated with a default converged load balancer called cluster-lb. Click default-cluster. The General Information for this cluster appears.


    Note –

    In the General tab on the right hand pane, ensure that the Heartbeat Enabled checkbox is selected. You need GMS service to be running to be able to use the converged load balancer.


  4. On the right pane, click the Instances tab. Click the New button to create two entries to specify two instances for the cluster.

  5. Type instance1. In the Node Agent field, nodeagent1 is selected by default.

  6. Type instance2. In the Node Agent field, nodeagent1 is selected by default. Click Save.

    Instead of steps 4,5, and 6 you can use the following asadmin commands:

    • asadmin create-instance --user admin --passwordfile adminpassword.txt --host hostname -port 4848 --cluster default-cluster --nodeagent nodeagent1 --systemproperties "JMX_SYSTEM_CONNECTOR_PORT=8687:IIOP_LISTENER_PORT=3330:IIOP_SSL_LISTENER_PORT=4440:IIOP_SSL_ MUTUALAUTH_PORT=5550:HTTP_LISTENER_PORT=1110:HTTP_SSL_LISTENER_PORT=2220" instance1

    • asadmin create-instance --user admin --passwordfile adminpassword.txt --host hostname -port 4848 --cluster default-cluster --nodeagent nodeagent1 --systemproperties "JMX_SYSTEM_CONNECTOR_PORT=8688:IIOP_LISTENER_PORT=3331:IIOP_SSL_LISTENER_PORT=4441:IIOP_SSL_ MUTUALAUTH_PORT=5551:HTTP_LISTENER_PORT=1111:HTTP_SSL_LISTENER_PORT=2221" instance2

  7. Click Save.

  8. Run the following command to enable converged load balancing in default-cluster:

    asadmin enable-converged-lb-server default-cluster

  9. From the Converged Load Balancers node in the Admin Console, choose cluster-lb, and click the Targets tab. Click the Edit Load Balancer Details link. In the Edit Load Balancer Details page, click to enable the Automatically Apply Changes option and click Save. By default, this option is disabled.

    You can also use the asadmin set command to set this option to true. For more details, see Chapter 2, Configuring Converged Load Balancing, in Sun GlassFish Communications Server 1.5 High Availability Administration Guide.

  10. To start the cluster,

    • Click the General tab and click the Start Cluster button.

    • Start the cluster and its instances by running the following command:

      asadmin start-cluster --user admin --passwordfile adminpassword.txt --host hostname --port 4848 default-cluster

    The two instances are started by default when you start the cluster. default-cluster is associated with a converged load balancer called cluster-lb, which is created by default by the Communications Server installation. This figure shows default-cluster and two instances running on this cluster.

    Admin Console shows the newly created cluster with two
running instances