# Federation - Fixed Index/Shard Allocation

**URL:** <https://discuss.elastic.co/t/federation-fixed-index-shard-allocation/17213>\
**Category:** Elasticsearch\
**Created:** [April 26, 2014, 10:36am UTC](https://discuss.elastic.co/t/federation-fixed-index-shard-allocation/17213 "2014-04-26T10:36:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srividhya\_Umashanker](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@Srividhya\_Umashanker](https://discuss.elastic.co/u/Srividhya_Umashanker)\
**Post date:** [April 26, 2014, 10:36am UTC](https://discuss.elastic.co/t/federation-fixed-index-shard-allocation/17213/1 "2014-04-26T10:36:27Z")

</div>

I understand the HA feature of ES will not be used, with what i am trying.

- I want the index to be tied to the nodes where they were created. And  
not available when the node is down.
- Trying to create a cluster of ES nodes, I want each node to have its  
own index/shard (no allocation). For now probably without a replica.
- The index updates are local to the node. The CUD operations on the  
node to be distributed. While i want the queries to occur on all indexes.

I have tried to use the cluster.routing.allocation.enable- Set to none.

Node 98 - Create an index "98" using /node98:9200/\_plugin/head  
Node 229 - Create an index "229 using /node229:9200/\_plugin/head

Both nodes have the above settings to "none" in the elasticsearch.yml file."

- I am trying to achieve "98" index to be placed on "node 98" and not  
moved. The same with "229" on "node 229"
- But both the indexes are "unassigned".  
cluster.routing.allocation.enable:all assigns the shards to random nodes.

Is there a to automatically achieve it without the "zone" allocation?  
Because, i dont want any shard allocation dynamically.

-Vidhya

--  
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/87d01e08-6e3d-4991-82a3-8c57a7da72f1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/87d01e08-6e3d-4991-82a3-8c57a7da72f1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Srividhya\_Umashanker](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@Srividhya\_Umashanker](https://discuss.elastic.co/u/Srividhya_Umashanker)\
**Post date:** [April 26, 2014, 6:02pm UTC](https://discuss.elastic.co/t/federation-fixed-index-shard-allocation/17213/2 "2014-04-26T18:02:12Z")

</div>

I was able to achieve it myself. In case it might be useful for someone  
else looking for an answer.

Found 2 ways of doing it.

1. Disable cluster routing and manually assign index to a node

2. Using routing

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html)  
This will make sure the index is created only on a node with a specific  
tag.

- cluster.routing.allocation.enable:"all"
- set the node.tag.. say appUUID229, and create an index with  
appropriate routing  
GET /229  
{  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 0,  
"index.routing.allocation.include.tag":"appUUID229"  
}

--  
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/6e4b75b0-7a48-4c3a-accf-bd17f406d2e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e4b75b0-7a48-4c3a-accf-bd17f406d2e0%40googlegroups.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, 1:33am UTC](https://discuss.elastic.co/t/federation-fixed-index-shard-allocation/17213/3 "2017-07-06T01:33:15Z")

</div>


