blob: 62d9d72bb275f68718a1e19bab4b6afe33ecdeb8 [file] [log] [blame]
<!--
Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<p><a id="task-create-cluster" name="task-create-cluster"></a><a id="GHCLU00027" name="GHCLU00027"></a></p>
<h4><a id="sthref2" name="sthref2"></a>To Create a Cluster</h4>
<a name="BEGIN" id="BEGIN"></a>
<p>A cluster is a named collection of GlassFish Server instances that share the same applications, resources, and configuration information.</p>
<p>A cluster 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.</p>
<p>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.</p>
<a id="sthref3" name="sthref3"></a>
<h5>Before You Begin</h5>
<p>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.</p>
<ol>
<li>
<p>In the navigation tree, select the Clusters node.</p>
<p>The Clusters page opens.</p>
</li>
<li>
<p>On the Clusters page, click New.</p>
<p>The New Cluster page opens.</p>
</li>
<li>
<p>In the Cluster Name field, type a name for the cluster.</p>
<p>The name must meet the following requirements:</p>
<ul>
<li>
<p>The name may contain only ASCII characters.</p>
</li>
<li>
<p>The name must start with a letter, a number, or an underscore.</p>
</li>
<li>
<p>The name may contain only the following characters:</p>
<ul>
<li>
<p>Lowercase letters</p>
</li>
<li>
<p>Uppercase letters</p>
</li>
<li>
<p>Numbers</p>
</li>
<li>
<p>Hyphen</p>
</li>
<li>
<p>Period</p>
</li>
<li>
<p>Underscore</p>
</li>
</ul>
</li>
<li>
<p>The name must be unique in the domain and must not be the name of a another cluster, a named configuration, a GlassFish Server instance, or a node.</p>
</li>
<li>
<p>The name must not be <code>domain</code>, <code>server</code>, or any other keyword that is reserved by GlassFish Server.</p>
</li>
</ul>
</li>
<li>
<p>From the Configuration drop-down list, select the named configuration that the cluster will use.</p>
<hr>
<p><b>Note:</b></p>
<p>If you select <code>default-config</code>, you must specify in the next step that the configuration is <i>not</i> shared. The <code>default-config</code> configuration cannot be shared.</p>
<hr>
</li>
<li>
<p>Specify whether the configuration that cluster will use is shared.</p>
<ul>
<li>
<p>If the configuration is not shared, leave the Make a Copy of the Selected Configuration option selected.</p>
<p>The selected configuration is copied when the cluster is created. The copy of the configuration is assigned the name <i>cluster-name</i><code>-config</code>, where <i>cluster-name</i> is the name of the cluster that you are creating.</p>
</li>
<li>
<p>If the configuration is shared, select the Reference the Selected Configuration option.</p>
<p>The cluster will use the specified existing named configuration.</p>
</li>
</ul>
</li>
<li>
<p><a id="sthref4" name="sthref4"></a>Add GlassFish Server instances to the cluster.</p>
<hr>
<p><b>Note:</b></p>
<p>To create an instance on a node of type CONFIG that represents a remote host, you must use the <a href="http://www.oracle.com/pls/topic/lookup?ctx=E26576_01&id=GSRFM00044"><code>create-local-instance</code>(1)</a> subcommand. You cannot use the Administration Console for this purpose.</p>
<hr>
<p>You can also add instances after the cluster is created, as described in <a href="task-create-clustered-instance.html">To Add a GlassFish Server Instance to a Cluster</a>.</p>
<p>Add each instance as follows:</p>
<ol type="a">
<li>
<p>In the Server Instances To Be Created area, click Add.</p>
<p>A row is added to the table of instances in the cluster.</p>
</li>
<li>
<p>In the Instance Name field, type a name for the instance.</p>
</li>
<li>
<p>In the Weight field, type an integer that represents the load-balancing weight of the instance.</p>
<p>The load-balancing weight determines the proportion of all requests to the cluster that the instance should process.</p>
<p>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.</p>
<p>The default weight is 100.</p>
</li>
<li>
<p>From the Node drop-down list, select the node where the instance is to reside.</p>
</li>
</ol>
</li>
<li>
<p>Click OK.</p>
<p>You are returned to the Clusters page. The cluster is added to the table of clusters on the page.</p>
</li>
</ol>
<a id="sthref5" name="sthref5"></a>
<h5>See Also</h5>
<ul>
<li>
<p><a href="task-delete-cluster.html">To Delete a Cluster</a></p>
</li>
<li>
<p><a href="task-availabilityservice.html">To Configure Availability Settings for a Cluster</a></p>
</li>
<li>
<p><a href="task-start-cluster.html">To Start a Cluster</a></p>
</li>
<li>
<p><a href="task-stop-cluster.html">To Stop a Cluster</a></p>
</li>
<li>
<p><a href="task-modify-cluster-config.html">To Modify the Configuration of a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-deploy.html">To Deploy an Application to a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-list.html">To List Applications That Are Deployed to a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-undeploy.html">To Undeploy Applications From a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-remove.html">To Remove Applications From a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-edit.html">To Edit an Application That Is Deployed to a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-enable-disable.html">To Enable or Disable an Application That Is Deployed to a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-app-lb-enable-disable.html">To Enable or Disable Load Balancing for an Application That Is Deployed to a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-resource-create.html">To Create a Resource for a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-resource-display.html">To List Resources for a Cluster</a></p>
</li>
<li>
<p><a href="task-cluster-resource-enable-disable.html">To Enable or Disable a Resource Globally</a></p>
</li>
<li>
<p><a href="task-cluster-resource-edit.html">To Edit a Resource for a Cluster</a></p>
</li>
<li>
<p><a href="task-upgrade-components.html">To Upgrade Components Without Loss of Service</a></p>
</li>
</ul>
<small>Copyright &#169; 2005, 2017, Oracle and/or its affiliates. All rights reserved. <a href="docinfo.html">Legal Notices</a></small>