Replacing a Specified Node for an Elasticsearch Cluster

If a node in an Elasticsearch cluster is faulty, you can replace it to restore services.

The node replacement process is as follows:
  1. Migrate data from the node that needs to be replaced to other available nodes.
  2. Rebuild a new node using this node's current ID, IP address, specifications, and AZ.
  3. Add the new node into the cluster. The system automatically triggers a shard reallocation, migrating some of the shards to the new node.

This process does not interrupt services because data is migrated from the replaced node to other available nodes.

Constraints

Change Impact

Before replacing a node, it is essential to assess the potential impacts and review operational recommendations. This enables proper scheduling of the node replacement, minimizing service interruptions.

Node Replacement Duration

The following formula can be used to estimate how long it will take to replace a specified node of a cluster:

Change duration (min) = 15 (min) + 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 (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

Replacing a Specified Node

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > Elasticsearch.
  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 Replace Node tab.
  5. On the Replace Node tab, set the parameters as needed.
    Table 1 Replacing a specified node

    Parameter

    Description

    Whether to perform data migration

    Selecting this option means data migration will be performed. If the target node has disabled indexes or has indexes that have no replicas, this option must be selected.

    Node Type

    Select the node you want to replace. You can expand a node type to check all the nodes under it.

  6. Click Submit.
  7. Click Back to Cluster List to go back to the Clusters page. The Task Status is Replacing nodes. When Cluster Status changes to Available, the node has been successfully replaced.