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
The following operations are performed:- 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
Replace <index_name> with the name of the index in the close state.
- 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. To ensure the stability of a cluster that contains multiple types of nodes during the configuration downgrade of the cluster, the load of the cluster must meet the conditions listed in the following table.
Node type CPU utilization JVM heap memory usage Dedicated master node Maximum value of a single node over the last seven days: < 30% Maximum value of a single node over the last seven days: < 25% Other types of nodes Both of the following conditions must be met: - Maximum value of a single node over the last seven days: < 50%
- Average value of all nodes of the same type over the last seven days: < 30%
Both of the following conditions must be met: - Maximum value of a single node over the last seven days: < 50%
- Average value of all nodes of the same type over the last seven days: < 30%
- Specifications
The selected vCPU and memory specifications are greater than or equal to half of the current specifications and are not 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.
- 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.
Procedure
- Log on to the Alibaba Cloud Elasticsearch console.
- In the left-side navigation pane, click Elasticsearch Clusters.
- In the top navigation bar, select the resource group to which your cluster belongs and the region where your cluster resides. In the left-side navigation pane, click Elasticsearch Clusters.
- On the Elasticsearch Clusters page, find your cluster and choose Actions column. in the
- Change the specifications or disk type of the nodes that you want to downgrade.
- 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.Note The restart mode triggered by a configuration downgrade is rolling restart. A rolling restart does not interrupt cluster services, but may affect the stability of the cluster. We recommend that you perform a configuration downgrade during off-peak hours.
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?
- Why am I unable to downgrade the configuration of warm nodes in my Elasticsearch cluster?
References
API operation for downgrading the configuration of a cluster: UpdateInstance