If your business has traffic peak and off-peak hours, the specifications of nodes in your Alibaba Cloud Elasticsearch cluster may be higher than the specifications 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
- Make sure that 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 the indexes. Otherwise, the upgrade fails.
- Run the following command to view the statuses of indexes:
GET /_cat/indices?v
- Run the following command to open an index in the close state:
POST /<index_name>/_open
- Run the following command to view the statuses of indexes:
Limits
- You are not allowed to reduce disk space or downgrade Kibana nodes.
- 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 the following specifications: 1 vCPU and 2 GiB of memory, 2 vCPUs and 2 GiB of memory, 2 vCPUs and 4 GiB of memory, and 4 vCPUs and 4 GiB of memory.
- Disk type
Disks with high storage performance can be updated to disks with low storage performance. The following types of disks are listed in descending order of their storage performance: enhanced SSDs (ESSDs), standard SSDs, and ultra disks. You can update the disk types of nodes in your cluster based on your business requirements. For more information about disks, see Disks.
Note You cannot update ESSDs at performance level 0 to SSDs.
- Downgrade interval
Precautions
- After you downgrade the configuration of your Elasticsearch cluster, the system restarts
the cluster to make the changes take effect.
- The restart mode is rolling restart. The restart does not interrupt your services, but may affect the stability of the cluster. For example, the CPU utilization and memory usage of nodes in the cluster may surge during the restart. To reduce the impact of the downgrade on your business, we recommend that you perform the downgrade during off-peak hours.
- 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.
- 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 Limits 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.
Procedure
FAQ
- Can I change the cloud disk type of an Elasticsearch cluster?
- Are services affected when I modify the configuration of an Elasticsearch cluster?
- Does the system reallocate shards for nodes in an Elasticsearch cluster after the number of nodes in the cluster is changed?
- When I purchase an Elasticsearch cluster, I performed an incorrect configuration. How do I modify the configuration after the cluster is created?
- Can I downgrade the configuration of an Elasticsearch cluster? If yes, what do I do?
References
API operation for downgrading the configuration of a cluster: UpdateInstance