Shards rebalance after node leaves cluster

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 !

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.

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 :slight_smile:

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