Sun Java System Web Server 6.1 SP9 Administrator's Guide

Chapter 7 Managing Server Clusters

This chapter describes the concept of clustering the Sun Java System Web servers. The chapter also explains how you can use the Sun Java System Web Server to share configurations among servers.

This chapter includes the following sections:

About Clusters

A cluster is a group of Sun Java System Web Servers that can be administered from a single Administration Server. Each cluster must include one server designated as the administration server. If you have more than one cluster, you can administer all clusters from a single “master” Administration Server. The master administration server retrieves the information about all the clusters and provides the interface for managing the Sun Java System Web Servers installed in their respective clusters.

Here are some of the tasks you can accomplish by organizing your servers into clusters:

You can specify a master Administration Server for administering all of your clusters by clustering your Sun Java System Web Server.


Note –

Individual servers can be installed on any computer in a network, but the Administration Server that you designate as the “master” contains information about all clustered servers, and must have access to each cluster’s individual Administration Server.


Guidelines for Using Server Clusters

When you configure a cluster, the master Administration Server containing the information about all clusters communicates with each individual cluster’s Administration Server. The administration server for each cluster must use the same administration user name and password as that of the master Administration Server.

Before you can create a cluster, make sure that all the servers to be included in the cluster are installed. For example, if you want three clusters of five Sun Java System Web Servers per cluster, you need to:

  1. Install all the servers on the computers on which they run using the same administration user name and password as the master Administration Server.

  2. Configure one of the Sun Java System Web Servers in each cluster as the Administration Server.

  3. Configure one single cluster’s administration server as the master Administration Server for all clusters. It doesn’t matter which server you choose as the master administration server.


    Caution – Caution –

    Clusters can only be homogeneous. All servers in the cluster must be either UNIX or Windows. Combining UNIX and Windows servers in the same cluster may cause the server to hang or crash.


    The following list provides some guidelines for configuring groups of servers into clusters:

    • Install all the servers to be included in a particular cluster prior to creating any clusters.

    • Make sure all servers in a cluster are Sun Java System Web Servers version 6.1.

    • Make sure all cluster-specific Administration Servers have the same userid and password as the master administration server. You can use distributed administration to set up multiple administrators on each Administration Server.

    • Install the servers on any computer in a network, as long as all computers in the cluster are Windows or UNIX.

    • You can designate any cluster-specific Administration Server as the master administration server.

    • Make sure the master Administration Server has access to each cluster-specific Administration Server. The master Administration Server retrieves information about all installed Sun Java System Web Servers.

    • Make sure all the Administration Servers are Sun Java System Web Server version 6.0 or 6.1 and use the same protocol, HTTP or HTTPS. Only Sun Java System Web Server 6.0 or 6.1 servers are supported for addition to clusters.

    • If you change the protocol of one Administration Server in a cluster, you must change the protocols for all Administration Servers. Then use the Modify Server interface to modify the individual servers in the cluster.

Setting Up a Cluster

ProcedureTo set up a Sun Java System Web Server cluster

  1. Install the Sun Java System Web Server on the computers to be include in the cluster.

    Make sure the Administration Server for the cluster has a username and password that the master Administration Server can use for authentication. To do this either use the default username and password or set up distributed administration.

  2. Install the server that contains the master Administration Server, making sure the username and password matches the one set in Step 1.

  3. Add a server to the cluster list.

  4. Administer a remote server by accessing its Server Manager forms from the cluster form or by copying a configuration file from one server in the cluster to another.


    Note –

    After changing the configuration for a remote server, restart the remote server.


Adding a Server to a Cluster

When you add a server to a cluster, you specify its Administration Server and port number. If the Administration Server contains information about more than one server, all its servers are added to the cluster. You can remove individual servers later.


Note –

If a remote Administration Server contains information about a cluster, the servers in the remote cluster are not added. The master Administration Server adds only those servers that are physically installed on the remote computer.


ProcedureTo add a remote server to a cluster

  1. Make sure the master Administration Server is tuned on.

  2. Access the Administration Server and choose the Cluster Mgmt tab.

  3. Click the Add Server link.

  4. Choose the protocol used by the remote Administration Server.

    • http for a normal Administration Server

    • https for a secure Administration Server

  5. Enter the fully qualified domain name as it appears in the magnus.conf file of the remote server in the Admin Server Hostname field.

    For example: plaza.sun.com

  6. Enter the port number for the remote Administration Server.

  7. Click OK.

    Your master Administration Server now attempts to contact the remote server. This can take a few minutes. You will receive a message confirming the server is added to the cluster.

  8. Click OK.


    Note –

    If you have two or more servers on different computers that use the same identifier, the server identifier and the hostname for each computer are displayed. When both server identifier and hostnames are the same, the port number is also displayed.



    Note –

    When you enable cluster control, the master of the cluster creates a number of files in the https-server-instance/config/cluster/server-name/https-server-name/ directory for each slave in the cluster. These files are not configurable.


Modifying Server Information

Use the Modify Server option only to update slave administration port information, after it has been changed on the slave server. If you change the port number of a remote Administration Server in your cluster, you also need to modify the information about that Administration Server stored in the cluster. Any other changes to the slave administration server require that you delete the server, and then add it back to the cluster after the changes are made.

The remote administration servers are not affected by modification to the master cluster database, unless their files have been transferred through Cluster Control.

ProcedureTo modify information about a server in a cluster

  1. Go to the Master Administration Server and choose the Cluster Mgmt tab.

  2. Click the Modify Server link.

    All servers appear listed by their unique server identifier.

  3. Select the server or server to modify by:

    • Checking a specific server.

    • Clicking Select All.

    • Click Reset to undo all selections.

  4. Enter the new port number.

  5. Click OK.

Removing Servers from a Cluster

ProcedureTo remove a server from the cluster

  1. Go to the Master Administration Server and choose the Cluster Mgmt tab.

  2. Click the Remove Server link.

  3. Select the remote server or servers to modify by:

    • Selecting a specific server.

    • Clicking Select All.

    • Click Reset Selection to undo all selections.

  4. Click OK.

    A message appears confirming that the server has been removed from the cluster. You can no longer access the removed server through the cluster. You can only access it through its own Administration Server.

Controlling Server Clusters

The Sun Java System Web Server 6.1 allows you to control the remote servers in your cluster by:


Caution – Caution –

Clusters must be homogeneous. All servers in the cluster must be either UNIX or Windows. Transferring configuration files from a different platform may cause the server to hang or crash.


ProcedureTo control servers within your cluster

  1. Go to the Server Manager for the Master Administration Server, and choose the Cluster Mgmt tab.

  2. Click the Cluster Control link.

  3. Select the server or servers to control by:

    • Checking a specific server

    • Clicking Select All to select all of the servers in the cluster

      Click Reset Selection to undo all selections.

  4. Select Start or Stop remote servers from the drop down menu.

  5. Select View Access or View Error log records from the drop down menu and enter the number of lines you want to view.

  6. To transfer configuration files:

    1. Select the configuration file to transfer from the drop down menu.

    2. Select the server from which you want to transfer the file from the drop down menu.

    3. Click Transfer.

Adding Variables

Variables are used when servers in a cluster must configured with different values. These values might be macros to define slaves using different port numbers, or plug-ins to define different shlib paths.

Adding variables affects only the master cluster database. The remote administration servers are not affected unless their files were transferred through Cluster Control. When variables are defined, the Administration Server can no longer run independently.

ProcedureTo add variables for a remote server within your cluster

  1. From the Master Administration Server, and choose the Cluster Mgmt tab.

  2. Click the Add Variables link.

  3. Check the specific server you wish to add variables for.

  4. In the Name field enter the type of variable you are adding.

    For example: ”Port’.

  5. In the Value field enter the value you are adding.

    For example: if ”Port’ is entered in the name field, the value would be the port number.

  6. Click OK.

    A message appears confirming that the server variable was added.

  7. Click OK.

    Also add the variable to the server’s configuration file you are transferring to the slave. For example, if you are transferring the variable port, the variable should be declared in a server configuration file, say server.xml, as shown below:

    <SERVER legacyls="ls1" qosactive="no" qosmetricsinterval="30" 
    qosrecomputeinterval="100">
    ...
    
    <LS id="ls1" ip="0.0.0.0" port="$port" security="off" 
    acceptorthreads="1" blocking="no">
    ...
    
    </SERVER>

    You can set variables with different values for each slave in the configuration file. Once added, variables can edited and deleted using the drop-down Option list in the Add Variables page.