Reset desired balance API
This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
Discards the current desired balance and computes a new desired balance starting from the current allocation of shards. This can sometimes help Elasticsearch find a desired balance which needs fewer shard movements to achieve, especially if the cluster has experienced changes so substantial that the current desired balance is no longer optimal without Elasticsearch having detected that the current desired balance will take more shard movements to achieve than needed. However, this API imposes a heavy load on the elected master node and may not always have the expected effect. Calling this API should never be necessary. Consider instead increasing the value of cluster.routing.allocation.balance.threshold to avoid excessive shard movements.
Request
resp = client.perform_request(
"DELETE",
"/_internal/desired_balance",
)
print(resp) const response = await client.transport.request({
method: "DELETE",
path: "/_internal/desired_balance",
});
console.log(response); DELETE /_internal/desired_balance
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-desired-balance.html