If your business has traffic peak and off-peak hours, the node specifications of your Alibaba Cloud Elasticsearch cluster may be higher than those required by your business during off-peak hours. In this case, you can downgrade the configuration of your cluster to reduce costs. You can downgrade nodes or change the disk types of nodes. This topic describes how to downgrade the configuration of an Elasticsearch cluster and provides the related precautions and instructions.

Prerequisites

  • The Elasticsearch cluster whose configuration you want to downgrade is in the Active state (indicated by the color green).
  • Log on to the Kibana console and check whether your cluster stores indexes in the close state. If your cluster stores such indexes, you must open or delete the indexes. Otherwise, the upgrade fails.
    • Run the following command to view the statuses of indexes:
      GET /_cat/indices?v
      View the statuses of indexes
    • Run the following command to open an index in the close state:
      POST /<index_name>/_open
    • Run the following command to delete an index in the close state:
      Warning Proceed with caution because the deleted indexes cannot be recovered.
      DELETE /<index_name>

Limits

You are not allowed to reduce disk space or downgrade Kibana nodes.

Precautions

  • After you downgrade the configuration of your Elasticsearch cluster, the system restarts the cluster to make the changes take effect. The time required for the restart depends on the specifications, data structure, and data volume of the cluster. In most cases, the restart requires a few hours. Therefore, to reduce the impact of the downgrade on your business, we recommend that you perform the downgrade during off-peak hours. For more information, see Restart a cluster or node.
  • Before you downgrade the configuration of your Elasticsearch cluster, perform the operations provided in Evaluate specifications and storage capacity and make sure that the conditions provided in Conditions for configuration downgrades are met. This ensures that your cluster has sufficient storage after the downgrade. If the cluster load is high after the downgrade, we recommend that you upgrade the configuration at the earliest opportunity. For more information about how to upgrade the configuration of a cluster, see Upgrade the configuration of a cluster.
  • Configuration downgrades may cause additional risks, such as data loss, for clusters with non-standard specifications, such as a cluster that contains only two data nodes. Therefore, proceed with caution.
  • When you make a change to a multi-zone cluster, 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.

Conditions for configuration downgrades

The configuration of a cluster can be downgraded only if the following conditions are met:
  • Downgrade interval

    The interval between two configuration downgrades of a cluster must be no less than 30 minutes.

  • Cluster load

    A cluster may contain multiple types of nodes. The requirements for the current CPU utilization and JVM heap memory usage vary based on node types. The following table lists the requirements.

    Node type Current CPU utilization Current JVM heap memory usage
    Dedicated master node Maximum value of a single node: < 30% Maximum value of a single node: < 25%
    Data node Both of the following conditions must be met:
    • Maximum value of a single node: < 60%
    • Average value of all nodes: < 40%
    Both of the following conditions must be met:
    • Maximum value of a single node: < 50%
    • Average value of all nodes: < 30%
    Client node Both of the following conditions must be met:
    • Maximum value of a single node: < 50%
    • Average value of all nodes: < 30%
    Both of the following conditions must be met:
    • Maximum value of a single node: < 50%
    • Average value of all nodes: < 30%
    Warm node Both of the following conditions must be met:
    • Maximum value of a single node: < 60%
    • Average value of all nodes: < 40%
    Both of the following conditions must be met:
    • Maximum value of a single node: < 50%
    • Average value of all nodes: < 30%
  • Specifications

    The selected vCPU and memory specifications must be greater than or equal to half of the current specifications and cannot be 2 or 4 vCPUs and 4 GiB of memory.

  • Cloud disk type

    Cloud disks with high storage performance can be updated to cloud disks with low storage performance. The following types of cloud disks are listed in descending order of their storage performance: standard SSDs and ultra disks. You can update the cloud disk type of your cluster based on your business requirements. For more information about cloud disks, see Disks.

Procedure

  1. Log on to the Elasticsearch console.
  2. In the left-side navigation pane, click Elasticsearch Clusters.
  3. In the top navigation bar, select a resource group and a region.
  4. On the Elasticsearch Clusters page, find your cluster and choose More > Downgrade Configuration in the Actions column.
  5. Change the specifications or disk type of the nodes that you want to downgrade.
  6. Read the terms of service, select Elasticsearch Terms of Service, and then click Buy Now.
    After you complete the payment, the system restarts the cluster to make the changes take effect.

FAQ