# Balance New Data Among Nodes

**URL:** https://discuss.elastic.co/t/balance-new-data-among-nodes/169610
**Category:** Elasticsearch
**Created:** [February 22, 2019, 4:49pm UTC](https://discuss.elastic.co/t/balance-new-data-among-nodes/169610 "2019-02-22T16:49:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![codeboy](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@codeboy](https://discuss.elastic.co/u/codeboy)
#### Post date: [February 22, 2019, 4:49pm UTC](https://discuss.elastic.co/t/balance-new-data-among-nodes/169610/1 "2019-02-22T16:49:56Z")

</div>

I am doing high volume inserts into a cluster. Sometimes we take a node down for maintenance, or failure. When the node comes back up, the disk utilization on the node is lower than the other nodes. This causes new shards to be created on this node at a much higher rate, and the volume of new data hitting this node is very high after rejoining the cluster.

Is there a setting to ensure new shard creation is evenly balanced across the cluster, and let the re-balance (which we throttle, and run heavier at night) worry about disk utilization differences. Since we delete data after X days, rebalance will fix itself over time as well. It would be best for us to ensure good balance at insert time.

Thanks

---

<div class="post-metadata">

### Author: ![codeboy](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@codeboy](https://discuss.elastic.co/u/codeboy)
#### Post date: [February 22, 2019, 5:38pm UTC](https://discuss.elastic.co/t/balance-new-data-among-nodes/169610/2 "2019-02-22T17:38:01Z")

</div>

I am trying the following with good results.

"cluster.routing.allocation.balance.index": "100f"

And getting an even distribution of shards across nodes. Any dangers to lookout for ?

Is there a way to specify this for a few high-volume templates, and allow defaults to rule the rest?

---

<div class="post-metadata">

### Author: ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)
#### Post date: [February 23, 2019, 7:13am UTC](https://discuss.elastic.co/t/balance-new-data-among-nodes/169610/3 "2019-02-23T07:13:54Z")

</div>

> [@codeboy](#):
>
> Sometimes we take a node down for maintenance

You can [delay shard allocation](https://www.elastic.co/guide/en/elasticsearch/reference/current/delayed-allocation.html) when you take down a node for maintenance by setting the **index.unassigned.node\_left.delayed\_timeout** to a high enough value, for instance "60m" for an hours downtime. When the node comes up again it will recover the same shards it had before it was taken down, meaning your cluster will be balanced just like it was before the node was taken down. Just make sure to reset the delayed\_timeout once you're done with the maintenance.

Of course, setting delayed\_timeout means that while the node is down some of your indices will be in a yellow state because no replica from that node will be allocated to other nodes, so there is no fault tolerance anymore. But for a quick maintenance downtime this might be acceptable. I do this during rolling upgrades to stop shards from allocating to other nodes while I do the job.

---

<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: [March 23, 2019, 7:13am UTC](https://discuss.elastic.co/t/balance-new-data-among-nodes/169610/4 "2019-03-23T07:13:55Z")

</div>

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