During the development of your business, the volume of data stored in your Elasticsearch cluster and the number of access requests for the cluster continue to change. In this case, you may need to perform cluster update operations such as scale-out, scale-in, version upgrades, or node migration. To implement the operations, Elasticsearch provides two cluster update methods: in-place update and blue-green update. This topic describes the two methods.

Note In most cases, the system selects an appropriate method based on the cluster update operation that you want to perform. When you restart your cluster or node or upgrade the configuration of your cluster, you can select an update method based on your business requirements. For more information, see Restart a cluster or node or Upgrade the configuration of a cluster.

Precautions

  • Before you perform a cluster update operation, we recommend that you make sure that each index in your cluster has at least one replica shard. This improves the stability of your cluster.
  • Before you make a change to a multi-zone cluster, you must make sure that the number of replica shards of each index in the cluster is less than the number of zones in which the cluster is deployed. After the change is complete, you can manually increase the number of replica shards based on your business requirements. For more information about how to change the number of replica shards of indexes in a cluster, see Index Templates.

Cluster update methods

Cluster update methodDescriptionUse scenarioUsage note
In-place updateThe system performs a rolling update for the nodes that you want to update. This process does not involve data migration, and the time that is required for this process is not affected by the data volume of your cluster. However, the performance of your cluster may be affected. Your cluster encounters a performance bottleneck, and you want to complete a cluster update at the earliest opportunity. The in-place update method may affect the performance of your cluster. We recommend that you use this method during off-peak hours.
Blue-green updateThe system adds the same number of nodes to your cluster, seamlessly migrates data from the original nodes to the new nodes, and removes the original nodes from the cluster. This process is seamless but time-consuming, and the IP addresses of nodes are changed.
  • You do not have high requirements on the update speed but have high requirements on cluster availability.
    Warning The time that is required by a blue-green update is related to factors such as cluster specifications, data structure, and data volume. In most cases, the update requires a few hours. Therefore, we recommend that you perform a blue-green update during off-peak hours. In extreme cases, a blue-green update may affect read operations. We recommend that you configure an access retry mechanism for your client before you perform a blue-green update.
  • The performance of a node in your cluster does not meet your requirements. For example, the CPU utilization of the node remains high for a long period of time.
  • When you perform a forced restart, you cannot use the blue-green update method.
  • When you migrate nodes across zones, you can use only the blue-green update method.
  • If you change the disk type of nodes in your cluster when you upgrade or downgrade the configuration of your cluster, you can use only the blue-green update method.
    Note When you upgrade the configuration of your cluster, you can select the update method that you want to use. However, if you change the disk type of nodes in your cluster when you perform the upgrade, you can select only the blue-green update method.
  • If you change the storage space of the ultra disk for your cluster to a value greater than 2 TB when you upgrade the configuration of your cluster, you can use only the blue-green update method.
  • You cannot perform a blue-green update only for dedicated master nodes. If your cluster does not contain dedicated master nodes but contains client nodes, you cannot perform a blue-green update only for the client nodes.