# Primary Index allocation strategy

**URL:** <https://discuss.elastic.co/t/primary-index-allocation-strategy/9116>\
**Category:** Elasticsearch\
**Created:** [September 24, 2012, 12:40pm UTC](https://discuss.elastic.co/t/primary-index-allocation-strategy/9116 "2012-09-24T12:40:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thibaut\_Britz](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@Thibaut\_Britz](https://discuss.elastic.co/u/Thibaut_Britz)\
**Post date:** [September 24, 2012, 12:40pm UTC](https://discuss.elastic.co/t/primary-index-allocation-strategy/9116/1 "2012-09-24T12:40:01Z")

</div>

Hi,

We have a cluster of multiple machines and would like to balance this  
cluster by:

1. Making sure that each of the nodes contains about the same number of  
primary indexes (\_\> query primary\_first)
2. We have multiple datadirectories on these nodes (each on a seperate hd).  
We would like the primary indexes to be split evenly on theses hds on one  
node.

Is there any way to achieve this? How are the primary indexes being chosen  
on cluster start? On which criteria? Can we overwrite to which data  
directory the index will be placed?

Thanks,  
Thibaut

--

---

<div class="post-metadata">

**Author:** ![BillyEm](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@BillyEm](https://discuss.elastic.co/u/BillyEm)\
**Post date:** [September 26, 2012, 1:18am UTC](https://discuss.elastic.co/t/primary-index-allocation-strategy/9116/2 "2012-09-26T01:18:18Z")

</div>

Thibaut: I bet this thread, once you get through it (and its worth it) will  
answer yoour question.

[http://elasticsearch-users.115913.n3.nabble.com/Multimaster-td3621103.html](http://elasticsearch-users.115913.n3.nabble.com/Multimaster-td3621103.html)

On Monday, September 24, 2012 8:40:04 AM UTC-4, Thibaut wrote:

> Hi,
> 
> We have a cluster of multiple machines and would like to balance this  
> cluster by:
> 
> 1. Making sure that each of the nodes contains about the same number of  
> primary indexes (\_\> query primary\_first)
> 2. We have multiple datadirectories on these nodes (each on a seperate  
> hd). We would like the primary indexes to be split evenly on theses hds on  
> one node.
> 
> Is there any way to achieve this? How are the primary indexes being chosen  
> on cluster start? On which criteria? Can we overwrite to which data  
> directory the index will be placed?
> 
> Thanks,  
> Thibaut

--

---

<div class="post-metadata">

**Author:** ![Thibaut\_Britz](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@Thibaut\_Britz](https://discuss.elastic.co/u/Thibaut_Britz)\
**Post date:** [September 26, 2012, 4:53pm UTC](https://discuss.elastic.co/t/primary-index-allocation-strategy/9116/3 "2012-09-26T16:53:51Z")

</div>

Thanks,

I also saw that there are some features in this direction planned for 0.20.  
Looking forward to this 🙂

Thibaut

On Wed, Sep 26, 2012 at 3:18 AM, BillyEm [wmartinusa@gmail.com](mailto:wmartinusa@gmail.com) wrote:

> Thibaut: I bet this thread, once you get through it (and its worth it)  
> will answer yoour question.
> 
> [http://elasticsearch-users.115913.n3.nabble.com/Multimaster-td3621103.html](http://elasticsearch-users.115913.n3.nabble.com/Multimaster-td3621103.html)
> 
> On Monday, September 24, 2012 8:40:04 AM UTC-4, Thibaut wrote:
> 
> > Hi,
> > 
> > We have a cluster of multiple machines and would like to balance this  
> > cluster by:
> > 
> > 1. Making sure that each of the nodes contains about the same number of  
> > primary indexes (\_\> query primary\_first)
> > 2. We have multiple datadirectories on these nodes (each on a seperate  
> > hd). We would like the primary indexes to be split evenly on theses hds on  
> > one node.
> > 
> > Is there any way to achieve this? How are the primary indexes being  
> > chosen on cluster start? On which criteria? Can we overwrite to which data  
> > directory the index will be placed?
> > 
> > Thanks,  
> > Thibaut
> > 
> > --

--

---

<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:11am UTC](https://discuss.elastic.co/t/primary-index-allocation-strategy/9116/4 "2017-07-06T03:11:16Z")

</div>


