# Distribution of New Indexes Being Created

**URL:** <https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062>\
**Category:** Elasticsearch\
**Created:** [August 5, 2011, 7:35am UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062 "2011-08-05T07:35:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Coe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_coe/32/3030_2.png) [@Ben\_Coe](https://discuss.elastic.co/u/Ben_Coe)\
**Post date:** [August 5, 2011, 7:35am UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062/1 "2011-08-05T07:35:08Z")

</div>

I have a question about ElasticSearch's behaviour.

Here's the scenario:

- I have a cluster of ElasticSearch servers setup to use discovery:

discovery:  
jgroups:  
config: tcp  
bind\_port: 9700  
bind\_addr: 0.0.0.0  
tcpping:  
initial\_hosts: 192.0.0.1[9700],192.0.0.2[9700], 192.0.0.2[9700]

- I create a new index connecting to one of the three boxes in the  
cluster:

curl -XPUT '[http://192.0.0.2:9700/foobar/](http://192.0.0.2:9700/foobar/)' -d '  
index :  
number\_of\_shards : 1  
number\_of\_replicas : 2  
'

The question:

Will any effort be made during creation to load-balance the indexes  
across the three servers specified in the discovery stanza? Or, is the  
index created on whatever server the PUT is performed on?

Why I ask:

I'm using ElasticSearch for a domain that requires many indexes, as  
oppose to a single monolithic index. I therefore do not require  
sharding as much as I require an even distribution of indexes across a  
set of boxes, along with replication.

What would my best course of action be to achieve this goal, i.e:

- An even distribution of indexes across a cluster of servers (with  
minimal pain during the creation process).
- Sane replication.
- High availability. Ideally, I can connect to any node in the cluster  
and retrieve a document, regardless of the server that the index  
resides on.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 5, 2011, 7:47pm UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062/2 "2011-08-05T19:47:46Z")

</div>

The distribution behavior of elasticsearch is to get to a state where there  
is an even number of shards across the nodes. So you should be good.

Btw, which version of elasticsearch are you using? jgroups is not there  
since 0.7 or something...

On Fri, Aug 5, 2011 at 10:35 AM, Ben Coe [ben@attachments.me](mailto:ben@attachments.me) wrote:

> I have a question about Elasticsearch's behaviour.
> 
> Here's the scenario:
> 
> - I have a cluster of Elasticsearch servers setup to use discovery:
> 
> discovery:  
> jgroups:  
> config: tcp  
> bind\_port: 9700  
> bind\_addr: 0.0.0.0  
> tcpping:  
> initial\_hosts: 192.0.0.1[9700],192.0.0.2[9700], 192.0.0.2[9700]
> 
> - I create a new index connecting to one of the three boxes in the  
> cluster:
> 
> curl -XPUT '[http://192.0.0.2:9700/foobar/](http://192.0.0.2:9700/foobar/)' -d '  
> index :  
> number\_of\_shards : 1  
> number\_of\_replicas : 2  
> '
> 
> The question:
> 
> Will any effort be made during creation to load-balance the indexes  
> across the three servers specified in the discovery stanza? Or, is the  
> index created on whatever server the PUT is performed on?
> 
> Why I ask:
> 
> I'm using Elasticsearch for a domain that requires many indexes, as  
> oppose to a single monolithic index. I therefore do not require  
> sharding as much as I require an even distribution of indexes across a  
> set of boxes, along with replication.
> 
> What would my best course of action be to achieve this goal, i.e:
> 
> - An even distribution of indexes across a cluster of servers (with  
> minimal pain during the creation process).
> - Sane replication.
> - High availability. Ideally, I can connect to any node in the cluster  
> and retrieve a document, regardless of the server that the index  
> resides on.

---

<div class="post-metadata">

**Author:** ![Ben\_Coe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_coe/32/3030_2.png) [@Ben\_Coe](https://discuss.elastic.co/u/Ben_Coe)\
**Post date:** [August 6, 2011, 1:52am UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062/3 "2011-08-06T01:52:46Z")

</div>

I'm on 0.16.2. I guess, I found the documentation with that jgroups  
example in some old documentation.

What would you recommend as the best way, out of the gate, to announce  
the presence of nodes throughout a cluster?

Could you point me at some documentation, or provide an example?

On Aug 5, 12:47 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> The distribution behavior of elasticsearch is to get to a state where there  
> is an even number of shards across the nodes. So you should be good.
> 
> Btw, which version of elasticsearch are you using? jgroups is not there  
> since 0.7 or something...
> 
> On Fri, Aug 5, 2011 at 10:35 AM, Ben Coe [b...@attachments.me](mailto:b...@attachments.me) wrote:
> 
> > I have a question about Elasticsearch's behaviour.
> 
> > Here's the scenario:
> 
> > - I have a cluster of Elasticsearch servers setup to use discovery:
> 
> > discovery:  
> > jgroups:  
> > config: tcp  
> > bind\_port: 9700  
> > bind\_addr: 0.0.0.0  
> > tcpping:  
> > initial\_hosts: 192.0.0.1[9700],192.0.0.2[9700], 192.0.0.2[9700]
> 
> > - I create a new index connecting to one of the three boxes in the  
> > cluster:
> 
> > curl -XPUT '[http://192.0.0.2:9700/foobar/'-d](http://192.0.0.2:9700/foobar/'-d) '  
> > index :  
> > number\_of\_shards : 1  
> > number\_of\_replicas : 2  
> > '
> 
> > The question:
> 
> > Will any effort be made during creation to load-balance the indexes  
> > across the three servers specified in the discovery stanza? Or, is the  
> > index created on whatever server the PUT is performed on?
> 
> > Why I ask:
> 
> > I'm using Elasticsearch for a domain that requires many indexes, as  
> > oppose to a single monolithic index. I therefore do not require  
> > sharding as much as I require an even distribution of indexes across a  
> > set of boxes, along with replication.
> 
> > What would my best course of action be to achieve this goal, i.e:
> 
> > - An even distribution of indexes across a cluster of servers (with  
> > minimal pain during the creation process).
> > - Sane replication.
> > - High availability. Ideally, I can connect to any node in the cluster  
> > and retrieve a document, regardless of the server that the index  
> > resides on.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 6, 2011, 5:02pm UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062/4 "2011-08-06T17:02:38Z")

</div>

By default, multicast is used to perform discovery. If you want to use  
unicast discovery, you can find a sample of how to configure it in the  
provided configuration file:  
[https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml#L28](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml#L28)  
.

On Sat, Aug 6, 2011 at 4:52 AM, Ben Coe [ben@attachments.me](mailto:ben@attachments.me) wrote:

> I'm on 0.16.2. I guess, I found the documentation with that jgroups  
> example in some old documentation.
> 
> What would you recommend as the best way, out of the gate, to announce  
> the presence of nodes throughout a cluster?
> 
> Could you point me at some documentation, or provide an example?
> 
> On Aug 5, 12:47 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > The distribution behavior of elasticsearch is to get to a state where  
> > there  
> > is an even number of shards across the nodes. So you should be good.
> > 
> > Btw, which version of elasticsearch are you using? jgroups is not there  
> > since 0.7 or something...
> > 
> > On Fri, Aug 5, 2011 at 10:35 AM, Ben Coe [b...@attachments.me](mailto:b...@attachments.me) wrote:
> > 
> > > I have a question about Elasticsearch's behaviour.
> > 
> > > Here's the scenario:
> > 
> > > - I have a cluster of Elasticsearch servers setup to use discovery:
> > 
> > > discovery:  
> > > jgroups:  
> > > config: tcp  
> > > bind\_port: 9700  
> > > bind\_addr: 0.0.0.0  
> > > tcpping:  
> > > initial\_hosts: 192.0.0.1[9700],192.0.0.2[9700], 192.0.0.2[9700]
> > 
> > > - I create a new index connecting to one of the three boxes in the  
> > > cluster:
> > 
> > > curl -XPUT '[http://192.0.0.2:9700/foobar/'-d](http://192.0.0.2:9700/foobar/'-d) '  
> > > index :  
> > > number\_of\_shards : 1  
> > > number\_of\_replicas : 2  
> > > '
> > 
> > > The question:
> > 
> > > Will any effort be made during creation to load-balance the indexes  
> > > across the three servers specified in the discovery stanza? Or, is the  
> > > index created on whatever server the PUT is performed on?
> > 
> > > Why I ask:
> > 
> > > I'm using Elasticsearch for a domain that requires many indexes, as  
> > > oppose to a single monolithic index. I therefore do not require  
> > > sharding as much as I require an even distribution of indexes across a  
> > > set of boxes, along with replication.
> > 
> > > What would my best course of action be to achieve this goal, i.e:
> > 
> > > - An even distribution of indexes across a cluster of servers (with  
> > > minimal pain during the creation process).
> > > - Sane replication.
> > > - High availability. Ideally, I can connect to any node in the cluster  
> > > and retrieve a document, regardless of the server that the index  
> > > resides on.

---

<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:58am UTC](https://discuss.elastic.co/t/distribution-of-new-indexes-being-created/5062/5 "2017-07-06T03:58:04Z")

</div>

Closed on July 6, 2017, 3:58am UTC


