# How to rebalance primary shards on elastic cluster

**URL:** <https://discuss.elastic.co/t/how-to-rebalance-primary-shards-on-elastic-cluster/176060>\
**Category:** Elasticsearch\
**Created:** [April 9, 2019, 3:28pm UTC](https://discuss.elastic.co/t/how-to-rebalance-primary-shards-on-elastic-cluster/176060 "2019-04-09T15:28:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![andrese](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@andrese](https://discuss.elastic.co/u/andrese)\
**Post date:** [April 16, 2019, 1:43pm UTC](https://discuss.elastic.co/t/how-to-rebalance-primary-shards-on-elastic-cluster/176060/4 "2019-04-16T13:43:35Z")

</div>

Thanks for the quick response,

Sure, I will open a issue in Github, as a new feature request and will also try to push it through our supported subscriptions.

The cluster reroute API workaround is exactly what we are using in some clusters (moving replicas and a primaries in the same reroute transaction, to a node with less primaries). But we have found 2 main drawbacks that makes this solution insufficient:

1. Its a resource heavy operation, as shard data has to be moved arround.
2. We need to have spare node that won't host any shard from the affected index (we cannot swap a replica and a primary between 2 nodes without using an intermediate node).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-rebalance-primary-shards-on-elastic-cluster/176060)._
