# Data balancing problem

**URL:** <https://discuss.elastic.co/t/data-balancing-problem/9010>\
**Category:** Elasticsearch\
**Created:** [September 13, 2012, 11:30am UTC](https://discuss.elastic.co/t/data-balancing-problem/9010 "2012-09-13T11:30:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![revdev\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/revdev_2/32/1852_2.png) [@revdev\_2](https://discuss.elastic.co/u/revdev_2)\
**Post date:** [September 13, 2012, 11:30am UTC](https://discuss.elastic.co/t/data-balancing-problem/9010/1 "2012-09-13T11:30:05Z")

</div>

we have 8 nodes in an ES cluster and an index which we have set to 4 shards  
with 1 replica. i would've assumed that this would mean 4 roughly equal  
chunks on 4 nodes and replicas of those 4 chunks on the other 4 nodes but  
that doesn't seem to be the case. for example, one node is primary for one  
chunk and is a non-primary replica of two others and some nodes have no  
data at all. is the rebalancer disabled by default? how can i check the  
status? is there a way to manually redistribute the data?

thanks for any guidance!  
-r

--

---

<div class="post-metadata">

**Author:** ![olof](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olof/32/2721_2.png) [@olof](https://discuss.elastic.co/u/olof)\
**Post date:** [September 14, 2012, 11:16am UTC](https://discuss.elastic.co/t/data-balancing-problem/9010/2 "2012-09-14T11:16:44Z")

</div>

The balancing is not very intelligent, and it tends to mess up if a node  
leaves and enters the cluster.  
You can, however, control how many shards (primary & replicas) that you  
have on each node. I use this to ensure that each node has a primary shard  
and one replica.  
Take a look at

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

and index.routing.allocation.total\_shards\_per\_node.

Den torsdagen den 13:e september 2012 kl. 13:30:05 UTC+2 skrev revdev:

> we have 8 nodes in an ES cluster and an index which we have set to 4  
> shards with 1 replica. i would've assumed that this would mean 4 roughly  
> equal chunks on 4 nodes and replicas of those 4 chunks on the other 4 nodes  
> but that doesn't seem to be the case. for example, one node is primary for  
> one chunk and is a non-primary replica of two others and some nodes have no  
> data at all. is the rebalancer disabled by default? how can i check the  
> status? is there a way to manually redistribute the data?
> 
> thanks for any guidance!  
> -r

--

---

<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:** [July 6, 2017, 3:12am UTC](https://discuss.elastic.co/t/data-balancing-problem/9010/3 "2017-07-06T03:12:46Z")

</div>


