To Create a Cluster

A cluster is a named collection of GlassFish Server instances that share the same applications, resources, and configuration information.

A cluster to provides high availability through scalability, load balancing, and failure protection. When an instance or a host in a cluster fails, GlassFish Server detects the failure, redirects requests from the failed instance to other instances in the cluster, and recovers the user session state. Because the same applications and resources are on all instances in the cluster, an instance can fail over to any other instance in the cluster.

GlassFish Server enables you to administer all the instances in a cluster as a single unit from a single host, regardless of whether the instances reside on the same host or different hosts.

Before You Begin

If you plan to add GlassFish Server instances to the cluster that you are creating, ensure that the nodes on which the instances are to reside already exist.

  1. In the navigation tree, select the Clusters node.

    The Clusters page opens.

  2. On the Clusters page, click New.

    The New Cluster page opens.

  3. In the Cluster Name field, type a name for the cluster.

    The name must meet the following requirements:

  4. From the Configuration drop-down list, select the named configuration that the cluster will use.

    Note - If you select default-config, you must specify in the next step that the configuration is not shared. The default-config configuration cannot be shared.


  5. Specify whether the configuration that cluster will use is shared.
  6. (Optional) Add GlassFish Server instances to the cluster.

    You can also add instances after the cluster is created.

    Add each instance as follows:

    1. In the Server Instances To Be Created area, click Add.

      A row is added to the table of instances in the cluster.

    2. In the Instance Name field, type a name for the instance.
    3. In the Weight field, type an integer that represents the load-balancing weight of the instance.

      The load-balancing weight determines the proportion of all requests to the cluster that the instance should process.

      For example, in a two-instance cluster, you might require one instance to process one out of four requests, and the other instance to process three out of four requests. In this situation, set the weight of the instance that is process one out of four requests to 1 and set the weight of the other instance to 3. If you prefer to use percentages, set the weights of the instances to 25 and 75 respectively.

      The default weight is 100.

    4. From the Node drop-down list, select the node where the instance is to reside.
  7. Click OK.

    You are returned to the Clusters page. The cluster is added to the table of clusters on the page.

See Also
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices