# Shard Balancing

**URL:** https://discuss.elastic.co/t/shard-balancing/21629
**Category:** Elasticsearch
**Created:** [January 14, 2015, 9:59am UTC](https://discuss.elastic.co/t/shard-balancing/21629 "2015-01-14T09:59:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![umutcan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umutcan/32/625_2.png) [@umutcan](https://discuss.elastic.co/u/umutcan)
#### Post date: [January 14, 2015, 9:59am UTC](https://discuss.elastic.co/t/shard-balancing/21629/1 "2015-01-14T09:59:50Z")

</div>

Hi,

I have a question regarding balance settings of Elasticsearch. I have 10  
nodes and each index has 10 shards (5 primary, 5 replica). I want for  
all nodes to have only 1 shard of an index. The documents explains some  
settings here [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) to do this, but I am not  
sure what values to use. Is it a good idea to set 1.0 first three  
settings? Is there any possible problems if I change these settings?

Best,

Umutcan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com](https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 14, 2015, 11:10am UTC](https://discuss.elastic.co/t/shard-balancing/21629/2 "2015-01-14T11:10:08Z")

</div>

If you start 10 nodes and have 10 shards to allocate, elasticsearch will most likely do what you are expecting: 1 shard per node.  
So you don’t really need to define any setting but just use elasticsearch defaults which are good most of the time.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 14 janv. 2015 à 10:59, Umutcan [umutcan@gamegos.com](mailto:umutcan@gamegos.com) a écrit :
> 
> Hi,
> 
> I have a question regarding balance settings of Elasticsearch. I have 10 nodes and each index has 10 shards (5 primary, 5 replica). I want for all nodes to have only 1 shard of an index. The documents explains some settings here x-msg://4/elasticsearch@googlegroups.com to do this, but I am not sure what values to use. Is it a good idea to set 1.0 first three settings? Is there any possible problems if I change these settings?
> 
> Best,
> 
> Umutcan
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com](https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com) [https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![umutcan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umutcan/32/625_2.png) [@umutcan](https://discuss.elastic.co/u/umutcan)
#### Post date: [January 14, 2015, 12:27pm UTC](https://discuss.elastic.co/t/shard-balancing/21629/3 "2015-01-14T12:27:39Z")

</div>

You are right. Elasticsearch distribute shards to 10 nodes most of the  
time. But there are exceptions and I want to guarantee it that every  
time shards will be distributed even or at least decrease frequency of  
these exceptions.

On 14-01-2015 13:10, David Pilato wrote:

> If you start 10 nodes and have 10 shards to allocate, elasticsearch  
> will most likely do what you are expecting: 1 shard per node.  
> So you don’t really need to define any setting but just use  
> elasticsearch defaults which are good most of the time.
> 
> --  
> _David Pilato_ | /Technical Advocate/ | _[Elasticsearch.com](http://Elasticsearch.com)  
> [http://Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) |@scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> > Le 14 janv. 2015 à 10:59, Umutcan \<[umutcan@gamegos.com](mailto:umutcan@gamegos.com)  
> > [mailto:umutcan@gamegos.com](mailto:umutcan@gamegos.com)\> a écrit :
> > 
> > Hi,
> > 
> > I have a question regarding balance settings of Elasticsearch. I have  
> > 10 nodes and each index has 10 shards (5 primary, 5 replica). I want  
> > for all nodes to have only 1 shard of an index. The documents  
> > explains some settings here  
> > x-msg://4/elasticsearch@googlegroups.com to do this, but I am not  
> > sure what values to use. Is it a good idea to set 1.0 first three  
> > settings? Is there any possible problems if I change these settings?
> > 
> > Best,
> > 
> > Umutcan
> > 
> > --  
> > You received this message because you are subscribed to the Google  
> > Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it,  
> > send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com)  
> > [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com](https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/54B63E16.5050608%40gamegos.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google  
> Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send  
> an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com)  
> [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr)  
> [https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/05274FAC-8C3B-41DA-A0B5-6F47A6589C45%40pilato.fr?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/54B660BB.9020202%40gamegos.com](https://groups.google.com/d/msgid/elasticsearch/54B660BB.9020202%40gamegos.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:39am UTC](https://discuss.elastic.co/t/shard-balancing/21629/4 "2017-07-06T00:39:03Z")

</div>


