# Primary shard auto re-balancing

**URL:** <https://discuss.elastic.co/t/primary-shard-auto-re-balancing/87908>\
**Category:** Elasticsearch\
**Created:** [June 1, 2017, 12:36pm UTC](https://discuss.elastic.co/t/primary-shard-auto-re-balancing/87908 "2017-06-01T12:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkTierney](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@MarkTierney](https://discuss.elastic.co/u/MarkTierney)\
**Post date:** [June 1, 2017, 12:36pm UTC](https://discuss.elastic.co/t/primary-shard-auto-re-balancing/87908/1 "2017-06-01T12:36:36Z")

</div>

Hi Folks,

I have a cluster with three data nodes with an index that has three primary shards with one replica each. When I stop one of the nodes, Elasticsearch promotes one of the replicas elsewhere to primary. At this time I have two primaries on one of my two active data nodes. When I restart the node I previously stopped it reallocates the replicas left unassigned to the now newly active node. The Primary "moved" during shutdown remains where it is with one of it's brothers.

I understand that for search all shards participate in searching. I also understand that for indexing we write to primary first and then replicate to the replica.

I have noticed that during heavy search load testing the node with more than one primary exhibits greater CPU utilization.

Is there is a way to bias Elasticsearch to re-balance the primaries automatically when the absent node rejoins the cluster? I can execute the reroute API manually but I'd like this to be as automatic as possible.

Thanks, Mark

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 29, 2017, 12:36pm UTC](https://discuss.elastic.co/t/primary-shard-auto-re-balancing/87908/2 "2017-06-29T12:36:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
