Switching AZs for an OpenSearch Cluster

CSS supports cross-AZ deployment. By switching AZs for a cluster, you can make more resources available to the cluster or improve the cluster's availability.

You can Add AZ or Migrate AZ.
The AZ change process is as follows:
  1. Migrate data from one node to other available nodes.

  2. Rebuild the node for the target AZ. Keep the node ID, IP address, and specifications unchanged.
  3. Add the new node into the cluster. The system automatically triggers a shard reallocation, migrating some of the shards to the new node. Then repeat these steps on all the other nodes.

The nodes are changed one at a time to prevent service interruptions.

Constraints

Change Impact

Before changing a cluster's AZs, it is essential to assess the potential impacts and review operational recommendations. This enables proper scheduling of the change, minimizing service interruptions.

Change Duration

The following formula can be used to estimate how long it will take to change AZs for a cluster:

Change duration (min) = 15 (min) x Total number of nodes involved + Data migration duration (min)

where, 15 minutes indicates how long non-data migration operations (e.g., initialization) typically take per node. It is an empirical value.

Data migration duration (min) = Total data size of the nodes to be migrated (MB) ÷ [Total number of vCPUs of the data nodes x 32 (MB/s) x 60 (s)]

where,
  • 32 MB/s indicates that each vCPU can process 32 MB of data per second. It is an empirical value.
  • The formulas above use estimates under ideal conditions. The actual migration speed depends on cluster load.

Prerequisites

Changing AZs

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > OpenSearch.
  3. In the cluster list, find the target cluster, and choose More > Modify Configuration in the Operation column. The Modify Configuration page is displayed.
  4. Click the Change AZ tab.
  5. On the Change AZ page, set parameters.

    If the number of data nodes plus cold data nodes in a cluster is not divisible by the number of AZs, data in the cluster may be unevenly distributed after the AZ change is completed. For example, if the cluster has two AZs and three data nodes, one node may need to store twice as much data as the other two nodes. This uneven distribution of data may affect the cluster's query or write performance.

    Table 1 Parameters for changing AZs

    Parameter

    Description

    Operation Type

    • Add AZ: Add one or two AZs for a single-AZ cluster, or add one AZ for a dual-AZ cluster.

      To complete this AZ change, the system will try to move as few nodes as possible to rebuild the cluster. During this process, the YML configuration file of the nodes that are not modified is also updated. You need to restart the cluster to make the change take effect.

    • Migrate AZ: Migrate data from one AZ to another.

      After adding AZs, you need to restart the cluster to make the modification take effect.

    Node Type

    Select a node type for the AZ change.

    Select one node type or All nodes to change their AZ. When adding one or two AZs for a single-AZ cluster, you can only select All nodes.

    Current AZ

    Current AZ of a cluster

    Target AZ

    AZ to add or migrate to.

    • Add AZ: Select up to three AZs, which must include all your current AZs.
    • Migrate AZ: Select only one target AZ, which cannot be your current AZ.
  6. Click Submit. In the displayed dialog box, choose whether to check for the presence of a full index snapshot, and click OK to start the change.

    You are advised to select Check full index snapshot. This ensures that all data has been backed up, so that in case the task fails, the data can be restored using this snapshot.

    When Task Status in the task list below changes to Successful, the AZ change is completed.

  7. Confirm the result.
    1. In the cluster list, click the name of the target cluster. The cluster information page is displayed.
    2. On the Overview tab, check the cluster's AZs in the Configuration area to determine whether the switchover is successful.

Checking the Progress of an AZ Change Task

In the Jobs area, find the AZ change task.

Expand the task, and click View Progress to check its progress.

If the task status is Failed, you can retry or terminate the task.