# Can I force to index on one specific node of a cluster

**URL:** <https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515>\
**Category:** Elasticsearch\
**Created:** [January 26, 2013, 5:46pm UTC](https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515 "2013-01-26T17:46:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chunlei\_Wu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chunlei_wu/32/824_2.png) [@Chunlei\_Wu](https://discuss.elastic.co/u/Chunlei_Wu)\
**Post date:** [January 26, 2013, 5:46pm UTC](https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515/1 "2013-01-26T17:46:17Z")

</div>

Hi,

```
 I plan to setup ES cluster on EC2 like this:

       1: t1.small (node.data: false, http.enabled:true) - the 

```

front node

```
       2-4: t1.small (node.data: true, http.enabled:false) - the 

```

worker to serve the queries

```
       5: *t1.medium*(node.data.true, http:enabled:true) - a more 

```

powerful instance to handling index updating

```
 My indices do not need to be updated in realtime. I need to update 

```

indices regularly (say once a week, with a batch of changes). Ideally, I  
hope I can force the re-indexing happens only on node #5 (without syncing  
with other nodes), then I do some validation tests on the updated indices.  
If everything is OK, I can have the updated indices replicated to 2-4  
worker nodes. One thing to note is that while I am doing re-indexing on  
node #5, node 1-4 should be always live to serve queries against old  
indices.

```
 Another benefit of that is I only need to start node #5 when I need to 

```

update indices. I can just shut it down when it's not used to save the  
cost. For serving queries, my other small instance nodes are sufficient  
enough.

```
 Any thoughts? Or maybe a different cluster setting?

```

Thanks,

Chunlei

--

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [January 28, 2013, 4:34am UTC](https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515/2 "2013-01-28T04:34:23Z")

</div>

I prefer to have each node equivalent and spread the search/index load  
equally, granted I'm running on physical h/w. There could be benefit in  
having an offline rebuild node, though.

To answer your question, yes, you can use the shard allocation APIs:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

You'll also likely want to look at aliasing in order to swap in a new index:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Best Regards,  
Paul

On Saturday, January 26, 2013 10:46:17 AM UTC-7, Chunlei Wu wrote:

> Hi,
> 
> ```
> I plan to setup ES cluster on EC2 like this:
> 
> 1: t1.small (node.data: false, http.enabled:true) - the 
> 
> ```
> 
> front node
> 
> ```
> 2-4: t1.small (node.data: true, http.enabled:false) - the 
> 
> ```
> 
> worker to serve the queries
> 
> ```
> 5: *t1.medium*(node.data.true, http:enabled:true) - a 
> 
> ```
> 
> more powerful instance to handling index updating
> 
> ```
> My indices do not need to be updated in realtime. I need to update 
> 
> ```
> 
> indices regularly (say once a week, with a batch of changes). Ideally, I  
> hope I can force the re-indexing happens only on node #5 (without syncing  
> with other nodes), then I do some validation tests on the updated indices.  
> If everything is OK, I can have the updated indices replicated to 2-4  
> worker nodes. One thing to note is that while I am doing re-indexing on  
> node #5, node 1-4 should be always live to serve queries against old  
> indices.
> 
> ```
> Another benefit of that is I only need to start node #5 when I need 
> 
> ```
> 
> to update indices. I can just shut it down when it's not used to save the  
> cost. For serving queries, my other small instance nodes are sufficient  
> enough.
> 
> ```
> Any thoughts? Or maybe a different cluster setting?
> 
> ```
> 
> Thanks,
> 
> Chunlei

--

---

<div class="post-metadata">

**Author:** ![Chunlei\_Wu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chunlei_wu/32/824_2.png) [@Chunlei\_Wu](https://discuss.elastic.co/u/Chunlei_Wu)\
**Post date:** [January 28, 2013, 8:25pm UTC](https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515/3 "2013-01-28T20:25:52Z")

</div>

Thanks a lot. That should work for me. With the hints you gave, I also find  
this cluster-wide setting could be useful for my case:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

curl -XPUT localhost:9200/\_cluster/settings -d '{  
"transient" : {  
"cluster.routing.allocation.exclude.\_ip" : "10.0.0.1"  
}  
}'

That way, I can temporarily exclude a node (probably without changing the  
index name), and add it back after done with the indexing.

Chunlei

On Sunday, January 27, 2013 8:34:23 PM UTC-8, ppearcy wrote:

> I prefer to have each node equivalent and spread the search/index load  
> equally, granted I'm running on physical h/w. There could be benefit in  
> having an offline rebuild node, though.
> 
> To answer your question, yes, you can use the shard allocation APIs:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/allocation.html)
> 
> You'll also likely want to look at aliasing in order to swap in a new  
> index:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html)
> 
> Best Regards,  
> Paul
> 
> On Saturday, January 26, 2013 10:46:17 AM UTC-7, Chunlei Wu wrote:
> 
> > Hi,
> > 
> > ```
> > I plan to setup ES cluster on EC2 like this:
> > 
> > 1: t1.small (node.data: false, http.enabled:true) - 
> > 
> > ```
> > 
> > the front node
> > 
> > ```
> > 2-4: t1.small (node.data: true, http.enabled:false) - the 
> > 
> > ```
> > 
> > worker to serve the queries
> > 
> > ```
> > 5: *t1.medium*(node.data.true, http:enabled:true) - a 
> > 
> > ```
> > 
> > more powerful instance to handling index updating
> > 
> > ```
> > My indices do not need to be updated in realtime. I need to update 
> > 
> > ```
> > 
> > indices regularly (say once a week, with a batch of changes). Ideally, I  
> > hope I can force the re-indexing happens only on node #5 (without syncing  
> > with other nodes), then I do some validation tests on the updated indices.  
> > If everything is OK, I can have the updated indices replicated to 2-4  
> > worker nodes. One thing to note is that while I am doing re-indexing on  
> > node #5, node 1-4 should be always live to serve queries against old  
> > indices.
> > 
> > ```
> > Another benefit of that is I only need to start node #5 when I need 
> > 
> > ```
> > 
> > to update indices. I can just shut it down when it's not used to save the  
> > cost. For serving queries, my other small instance nodes are sufficient  
> > enough.
> > 
> > ```
> > Any thoughts? Or maybe a different cluster setting?
> > 
> > ```
> > 
> > Thanks,
> > 
> > Chunlei

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group, send email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:54am UTC](https://discuss.elastic.co/t/can-i-force-to-index-on-one-specific-node-of-a-cluster/10515/4 "2017-07-06T02:54:19Z")

</div>


