Configuring clustered servers for high availability

You can set up multiple servers for a clustered or high-availability configuration. In this configuration, multiple servers run at the same time.

Before you begin

About this task

To set up servers in a clustered configuration, you install the server on separate systems and connect the servers to the same database. Then, you configure a load balancer to distribute the traffic between the servers. Instead of accessing the servers directly, users access the load balancer URL. To the users, that URL appears to host a single instance of the server with high capacity; the users are not aware of the multiple servers.

Procedure

  1. If you already have one or more servers, convert them to cluster servers with the following steps:
    1. Stop the server.
    2. On the server, open the file install_folder/conf/server/installed.properties in a text editor. Use the server installation directory for install_folder.
    3. In this file, update the server.external.web.url parameter to the URL and port of the load balancer. Escape colons and other special characters with a backslash (\), as in the following example:
      server.external.web.url=https\://balancer.example.com\:8443
    4. Update the install.server.web.host parameter to the host name of the load balancer.
    5. Save the file.
  2. To install new cluster servers, install the servers as usual, but with the following changes:
    • Connect each server to the same database. Create the database schema only for the first server.
    • For the host name that the users access, specify the host name of the load balancer, not the computer that hosts the server.
    • If you are installing the server on the same computer as another server, use a different port for HTTPS requests for each server.
    • If you are installing the server on the same computer as another server, use a different port for agent communication for each server.
    See Installing the server. Be sure to note the ports for each server because you will need this information later. The default port is 8443 for HTTPS requests and 7918 for agent communication.
  3. Configure network storage for the configuration files:
    1. Stop one of the cluster servers.
    2. From the server installation directory, copy the following files and folders to the network storage and then delete the original files and folders on the server:
      • install_folder/var/email
      • install_folder/var/plugins
      • install_folder/var/repository
      • install_folder/logs
      • install_folder/conf/encryption.keystore
      • install_folder/conf/server.keystore
      • install_folder/conf/collectors
      • install_folder/patches
      • install_folder/conf/server/log4j.properties
      The default server installation directory is /opt/ibm-ucd/server on Linux and C:\Program Files\ibm-ucd\server on Windows.
    3. Create links from the locations that you deleted to the equivalent files on the network storage.
  4. Connect each other cluster server to the network storage:
    1. Stop the server.
    2. Delete the files and folders that are listed in step 3.b.
    3. Create links to the equivalent files on the network storage.
  5. From the install_folder/conf/server/installed.properties file on one server, copy the value of the encryption.keystore.alias property to the equivalent file on the other servers.
  6. On each cluster server, add the following line of code to the install_folder/conf/server/installed.properties file:
    com.urbancode.ds.UDeployServer.multiserver=true
  7. Start the servers.
  8. Create a network relay from each server to each other server:
    1. On the first server, click Settings > Network and then click Create New Network Relay.
    2. In the Create Network Relay window, specify a name for the relay and the host name of another server in the cluster.
    3. In the Port field, specify the agent communication port for the other server.
    4. Select the Active check box.
    5. Click Save.
    6. Repeat the process to create a network relay from each server in the cluster to each other server.
  9. Configure a load balancer to share the load between the servers. For more information, see the documentation for your load balancer.

Results

After you configure the load balancer to distribute connections to the servers, users can connect to a single URL and use the capacity of all of the servers. The servers also ensure that only one license per user is used, even if a user accesses multiple servers.

Feedback