# Shards rebalance after node leaves cluster

**URL:** <https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930>\
**Category:** Elasticsearch\
**Created:** [November 10, 2020, 3:17pm UTC](https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930 "2020-11-10T15:17:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travis/32/54079_2.png) [@Travis](https://discuss.elastic.co/u/Travis)\
**Post date:** [November 10, 2020, 3:17pm UTC](https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930/1 "2020-11-10T15:17:22Z")

</div>

Hello eveybody !

In a 6.8 cluster of 3 hot nodes and 2 cold nodes (with node attribute "Zone" and forced awareness option) :

- hot\_node1: Zone1
- hot\_node2: Zone1
- cold\_node\_4: Zone1

/

- hot\_node3: Zone2
- hot\_node5: Zone2

After one cold node leaves the cluster, all replicas are promoted as primaries in the reamaining cold node. Until there all is normal.

When missing cold node re-join the cluster, replicas are allocated on this node. So we have now this :

cold\_node\_1 : primary\_0 primary\_1 primary\_2 primary\_3  
cold\_node2 : replica\_0 replica\_1 replica\_2 replica\_3

My question : Is it normal that primaries and replicas shards are not rebalanced  
between the two cold nodes ? Like this :

cold\_node\_1 : primary\_0 replica\_1 primary\_2 replica\_3  
cold\_node2 : replica\_2 replica\_0 primary\_1 primary\_3

Thanks for you help !

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 10, 2020, 4:11pm UTC](https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930/2 "2020-11-10T16:11:41Z")

</div>

> [@Travis](#):
>
> Is it normal that primaries and replicas shards are not rebalanced  
> between the two cold nodes ?

Yes, that's normal. Primaries and replicas do pretty much the same work so there's nothing to be gained by spreading them out as you suggest.

---

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travis/32/54079_2.png) [@Travis](https://discuss.elastic.co/u/Travis)\
**Post date:** [November 10, 2020, 5:10pm UTC](https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930/3 "2020-11-10T17:10:33Z")

</div>

Thank you @DavidTurner.  
I asked this question because before one cold node leaves the cluster, all shards was balanced on the two cold nodes. If this is normal that's good 🙂

---

<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:** [December 8, 2020, 5:10pm UTC](https://discuss.elastic.co/t/shards-rebalance-after-node-leaves-cluster/254930/4 "2020-12-08T17:10:36Z")

</div>

Closed on December 8, 2020, 5:10pm UTC

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