Call us: +1-415-738-4000

Changing Cluster Topology in a Live Cluster

Introduction

Using the Terracotta Operations Center, a standalone enterprise-only console for operators, you can change the topology of a live cluster by reloading an edited Terracotta configuration file.

Note the following restrictions:

  • Only the removal or addition of <server> blocks in the <servers> section of the Terracotta configuration file are allowed.
  • All servers and clients must load the same configuration file to avoid topology conflicts.

    Servers that are part of the same server array but do not share the edited configuration file must have their configuration file edited and reloaded as shown below. Clients that do not load their configuration from the servers must have their configuration files edited to exactly match that of the servers.

Note: Changing the topology of a live cluster will not affect the distribution of data that is already loaded in the TSA. For example, if you added a stripe to a live cluster, the data in the server array would not be redistributed to utilize it. Instead, the new stripe could be used for adding new caches, while the original servers would continue to manage the original data.

Adding a New Server

To add a new server to a Terracotta cluster, follow these steps:

  1. Add a new <server> block to the <servers> section in the Terracotta configuration file being used by the cluster. The new <server> block should contain the minimum information required to configure a new server. It should appear similar to the following, with your own values substituted:

    <server host="myHost" name="server2" >
      <data>%(user.home)/terracotta/server2/server-data</data>
      <logs>%(user.home)/terracotta/server2/server-logs</logs>
      <statistics>%(user.home)/terracotta/server2/server-stats</statistics>
      <dso-port>9513</dso-port>
    </server>
    
  2. If you are using mirror groups, be sure to add a <member> element to the appropriate group listing the new server.
  3. Open the Terracotta Operations Center by running the following script:

    UNIX/LINUX

    ${TERRACOTTA_HOME}/bin/ops-center.sh
    

    MICROSOFT WINDOWS

    %TERRACOTTA_HOME%\bin\ops-center.bat
    
  4. After connecting to the cluster with the Operations Center, open the Change Server Topology panel.
  5. Click Reload. A message appears with the result of the reload operation. Change Server Topology Panel, Terracotta Operations Center.
  6. Start the new server.

Removing an Existing Server

To remove a server from a Terracotta cluster configuration, follow these steps:

  1. Shut down the server you want to remove from the cluster. If you shutting down an active server, first ensure that a backup server is online to enable failover.
  2. Delete the <server> block associated with the removed server from the <servers> section in the Terracotta configuration file being used by the cluster.
  3. If you are using mirror groups, be sure to remove the <member> element associated with the removed server.
  4. Open the Terracotta Operations Center by running the following script:

    UNIX/LINUX

    ${TERRACOTTA_HOME}/bin/ops-center.sh
    

    MICROSOFT WINDOWS

    %TERRACOTTA_HOME%\bin\ops-center.bat
    
  5. After connecting to the cluster with the Operations Center, open the Change Server Topology panel.
  6. Click Reload. A message appears with the result of the reload operation.

Editing the Configuration of an Existing Server

If you edit the configuration of an existing ("live") server and attempt to reload its configuration, the reload operation will fail. However, you can successfully edit an existing server's configuration by following these steps:

  1. Remove the server by following the steps in Removing an Existing Server. Instead of deleting the server’s <server> block, you can comment it out.
  2. Edit the server’s <server> block with the changed values.
  3. Add (or uncomment) the edited <server> block.
  4. If you are using mirror groups, be sure to add the <member> element associated with the server back to the appropriate mirror group.
  5. In the Operations Center's Change Server Topology panel, click Reload. A message appears with the result of the reload operation.

NOTE: To be able to edit the configuration of an existing server, all clients must load their configuration from the Terracotta Server Array (TSA). Clients that load configuration from another source will fail to remain connected to the TSA due to a configuration mismatch.