Sun logo      Previous      Contents      Next     

Sun Java System Application Server Enterprise Edition 8.1 Administration Guide 2005Q1

Chapter 2
Configuring Clusters

This chapter describes how to use the Admin Console to configure clusters. It contains the following sections:


About Clusters

What is a Cluster?

A cluster is a collection of zero or more server instances that work together as one logical entity. A cluster provides a runtime environment for one or more J2EE applications.

The use of clusters in the Sun Java System Application Server Enterprise Edition 8.1 environment provides the following:

A cluster has the following properties:

Every cluster in the domain has a unique name; furthermore, this name must be unique across all node agent names, server instance names, cluster names, and configuration names. The name must not be domain. Administrators perform the same operations on a cluster (for example, deploying applications and creating resources) that they perform on an unclustered server instance.

For an overview of the use of clusters, node agents, and server instances, see the Deployment Planning Guide. For details about the load balancer, see Configuring Load Balancing and Failover.

Cluster Types

There are two types of clusters: stand-alone clusters and shared clusters.

Clusters, Instances, Load Balancers, and Sessions

Clusters, server instances, load balancers, and sessions are related as follows in the Application Server:

The cluster thus acts as a safe boundary for session failover for the server instances within the cluster. You can use the load balancer and upgrade components within the Application Server without loss of service. For more information, see "Using Multiple Clusters for Online Upgrades Without Loss of Service".


Admin Console Tasks for Clusters

Creating a Cluster

To create a cluster, perform these steps:

  1. In the tree component, select the Clusters node.
  2. On the Clusters page, click New. The Create Cluster page appears.
  3. In the Name field, type a name for the cluster. The name
    • Must consist only of uppercase and lowercase letters, numbers, underscores, hyphens, and periods (.)
    • Must be unique across all node agent names, server instance names, cluster names, and configuration names
    • Must not be domain
  4. In the Configuration field, choose a configuration from the drop-down list.
  5. To create a stand-alone cluster, choose default-config, and leave the radio button labeled “Make a copy of the selected Configuration” selected. The copy of the default configuration will have the name cluster_name-config.

    To reference another configuration, choose the configuration from the drop-down list and select the radio button labeled “Reference the selected Configuration.” This action creates a shared cluster if the configuration is used by another cluster.

  6. You can add server instances now, or you can wait until after the cluster is created. Before you create server instances for the cluster, first create one or more node agents or node agent placeholders. See "Creating a Node Agent Placeholder" for details.
  7. To create server instances, perform the following steps:

    1. In the Server Instances To Be Created area, click Add.
    2. Type a name for the instance in the Instance Name field
    3. Choose a node agent from the Node Agent drop-down list.
  8. Click OK.
  9. Click OK on the Cluster Created Successfully page that appears.

For more details on how to administer clusters, server instances, and node agents, see "Deploying Node Agents".

Equivalent asadmin command: create-cluster

Configuring a Cluster

To configure a cluster, perform these steps:

  1. In the tree component, expand the Clusters node.
  2. Select the node for the cluster. On the General Information page, you can perform these tasks:
    • Click Start Instances to start the clustered server instances.
    • Click Stop Instances to stop the clustered server instances.
    • Click Migrate EJB Timers to migrate the EJB timers from a stopped server instance to another server instance in the cluster.

Equivalent asadmin commands: start-cluster, stop-cluster, migrate-timers

Migrating EJB Timers

If a server instance stops running abnormally or unexpectedly, it can be necessary to move the EJB timers installed on that server instance to a running server instance in the cluster. To do so, perform these steps:

  1. From the Source drop-down list, choose the stopped server instance from which to migrate the timers.
  2. Optionally, from the Destination drop-down list, choose the running server instance to which to migrate the timers. If this field is left blank, a running server instance will be randomly chosen.
  3. Click OK.
  4. Stop and restart the Destination server instance.

An error message appears if the Source server instance is running or if the Destination server instance is not running.

Equivalent asadmin command: migrate-timers

Creating Server Instances for a Cluster

Before you can create server instances for a cluster, you must first create a node agent or node agent placeholder. See "Creating a Node Agent Placeholder" for details.

To create a server instance for a cluster, perform these steps:

  1. In the tree component, expand the Clusters node.
  2. Select the node for the cluster.
  3. Click the Instances tab to bring up the Clustered Server Instances page.
  4. Click New to bring up the Create Clustered Server Instance page.
  5. In the Name field, type a name for the server instance.
  6. Choose a node agent from the Node Agents drop-down list.
  7. Click OK.

Equivalent asadmin command: create-instance

Configuring Clustered Server Instances

To make changes to a clustered server instance after creating it, perform these steps:

  1. In the tree component, expand the Clusters node.
  2. Expand the node for the cluster that contains the server instance, then select the server instance node to be edited.
  3. On the General Information page, you can perform these tasks:
    • Click Start Instance to start the instance.
    • Click Stop Instance to stop a running instance.
    • Click JNDI Browsing to browse the JNDI tree for a running instance.
    • Click View Log Files to open the server log viewer.
    • Click Rotate Log File to rotate the log file for the instance. This action schedules the log file for rotation. The actual rotation takes place the next time an entry is written to the log file.
    • Click Recover Transactions to recover incomplete transactions.
    • Click the Properties tab to modify the port numbers for the instance.
    • Click the Monitor tab to change monitoring properties.

You can also perform operations on a server instance as follows:

  1. In the tree component, expand the Clusters node.
  2. Expand the node for the cluster that contains the server instance.
  3. Click the Instances tab to go to the Clustered Server Instances page. On this page you can perform the following tasks:
    • Select the checkbox for an instance and click Delete, Start, or Stop.
    • Click the name of the instance to bring up the General Information page.

To delete a clustered server instance from a cluster, select the checkbox next to the instance name and click Delete.

Configuring Applications for a Cluster

To configure applications for a cluster, perform these steps:

  1. In the tree component, expand the Clusters node.
  2. Select the node for the cluster.
  3. Click the Applications tab to bring up the Applications page. On this page, you can perform these tasks:
    • Select the checkbox next to an application and choose Enable or Disable to enable or disable the application for the cluster.
    • From the Deploy drop-down list, select a type of application to deploy. On the Deployment page that appears, specify the application.
    • From the Filter drop-down list, select a type of application to display in the list.

To edit an application, click the application name.

Configuring Resources for a Cluster

To configure resources for a cluster, perform these steps:

  1. In the tree component, expand the Clusters node.
  2. Select the node for the cluster.
  3. Click the Resources tab to bring up the Resources page. On this page, you can perform these tasks:
    • Select the checkbox next to a resource and click Enable or Disable to enable or disable the resource globally. This action does not remove the resource.
    • From the New drop-down list, select a type of resource to create. Make sure to specify the cluster as a target when you create the resource.
    • From the Filter drop-down list, select a type of resource to display in the list.

To edit a resource, click the resource name.

Deleting a Cluster

To delete a cluster, perform these steps:

  1. In the tree component, select the Clusters node.
  2. On the Clusters page, select the checkbox next to the name of the cluster to be deleted.
  3. Click Delete.

Equivalent asadmin command: delete-cluster

Using Multiple Clusters for Online Upgrades Without Loss of Service

You can use the load balancer and multiple clusters to upgrade components within the Application Server without any loss of service. A component can, for example, be a JVM, the Application Server, or a web application.

To perform this task, do the following:

  1. Stop one of the clusters using the Stop Cluster button on the General Information page for the cluster.
  2. Upgrade the component in that cluster.
  3. Start the cluster using the Start Cluster button on the General Information page for the cluster.
  4. Repeat the process with the other clusters, one by one.

Because sessions within one cluster will never fail over to sessions within another cluster, there is no risk of version mismatch caused by a session’s failing over from a server instance that is running one version of the component to another server instance (in a different cluster) that is running a different version of the component. A cluster in this way acts as a safe boundary for session failover for the server instances within it.


Note

This approach is not possible in the following cases:

  • When you change the schema of the high-availability database (HADB). For more information, see the Administering High Availability Database chapter in the Sun Java System Application Server High Availability Administration Guide.
  • When you perform an application upgrade that involves a change to the application database schema.


Caution

Upgrade all server instances in a cluster together. Otherwise, there is a risk of version mismatch caused by a session failing over from one instance to another where the instances have different versions of components running.




Previous      Contents      Next     


Copyright 2004 - 2005 Sun Microsystems, Inc. All rights reserved.