Scaling In/Down an OpenSearch Cluster

If an OpenSearch cluster has excess capacity due to off-peak traffic or reduced data volumes, you can reduce its nodes to optimize costs.

Table 1 Scaling scenarios

Type

Scenario

Change Process

Removing nodes randomly

Randomly removes cluster nodes to optimize costs.

  1. Migrate the shards on the to-be-removed nodes to the remaining nodes.
  2. After data migration, bring the nodes offline and modify the cluster configuration.

Nodes are removed one at a time, so as to avoid interrupting services.

Removing specified nodes

Removes specified cluster nodes to optimize costs.

Impact on Billing

For a pay-per-use cluster, you can see its new price when confirming the scale-in on the console. After the scale-in is complete, the new price will apply.

Constraints

Change Impact

Before the change, learn about possible impacts and operation suggestions, and develop a plan to minimize these impacts.

Scale-in Duration

The following formula can be used to estimate how long a scale-in operation will take:

Scale-in duration (min) = 5 (min) x Number of nodes to be removed + Data migration duration (min)

where, 5 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 removed (MB) ÷ [Total number of vCPUs of the data nodes x 32 (MB/s) x 60 (s)]

where,

The following formula can be used to estimate how long a node storage reduction operation will take:

Node storage reduction duration (min) = 15 (min) x Number of nodes to be changed + 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.
  • The total number of nodes to be changed is the total number of data nodes or cold data nodes where node storage reduction is required.

Data migration duration (min) = Total data size (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

Removing Nodes Randomly

  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 Scale Cluster tab.
  5. Click Scale in to set parameters.
    Table 3 Removing nodes randomly

    Parameter

    Description

    Action

    Select Scale in.

    Resources

    Quantities of resources reduced.

    Nodes

    Reduce the number of nodes in the Nodes column. You can change multiple node types at the same time.

    For the range of node quantities supported by each node type, see Constraints.

  6. Click Next.
  7. Confirm the information and click Submit.
  8. Click Back to Cluster List to go back to the Clusters page. Task Status is Scaling in. When Cluster Status changes to Available, the cluster has been successfully scaled in.

Removing Specified Nodes

  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. On the Modify Configuration page, click the Scale In Nodes tab.
  5. Set scale-in parameters.
    Table 4 Removing specified nodes (Scale In Nodes)

    Parameter

    Description

    Node Type

    Expand the node type that needs be changed to show all nodes under it. Select the nodes you want to remove.

  6. Click Next.
  7. Confirm the change information and click Submit. In the confirm dialog box, choose to migrate data, which helps to prevent data loss, and click OK.

    During data migration, the system migrates all data from the to-be-removed nodes to the remaining nodes, and removes these nodes upon completion of the data migration. If the data on the to-be-removed nodes has replicas on other nodes, data migration can be skipped and the cluster change can be completed faster.

  8. Click Back to Cluster List to go back to the Clusters page. Task Status is Scaling in. When Cluster Status changes to Available, the cluster has been successfully scaled in.

Related Documents