# Is there any way to force Replica inside particular Node

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287>\
**Category:** Elasticsearch\
**Created:** [March 11, 2014, 12:33pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287 "2014-03-11T12:33:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumit\_gupta\_sgt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@sumit\_gupta\_sgt](https://discuss.elastic.co/u/sumit_gupta_sgt)\
**Post date:** [March 11, 2014, 12:33pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287/1 "2014-03-11T12:33:30Z")

</div>

Hi,

I am trying to configure ES Cluster using 2 Nodes in different Network.I am creating 1 index using 2 shards and 1 replica 1 replica is unassigned in cluster and cluster state is yellow.

Please tell me how we force replica inside particular Node.

Thanks & Regards,  
Sumit Gupta

---

<div class="post-metadata">

**Author:** ![Michael\_Lussier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_lussier/32/1591_2.png) [@Michael\_Lussier](https://discuss.elastic.co/u/Michael_Lussier)\
**Post date:** [March 11, 2014, 3:36pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287/2 "2014-03-11T15:36:27Z")

</div>

Are you positive you have two nodes up and running? This should be a green state with 2 nodes, 2 shards, 1 replica.

---

<div class="post-metadata">

**Author:** ![sumit\_gupta\_sgt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@sumit\_gupta\_sgt](https://discuss.elastic.co/u/sumit_gupta_sgt)\
**Post date:** [March 11, 2014, 6:07pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287/3 "2014-03-11T18:07:29Z")

</div>

Hi,

I got it why it is happening because of different version of ES.  
But Now i want configure like for one node two shards and for one node two replicas.Please advice.

Thanks & Regards,  
Sumit Gupta

---

<div class="post-metadata">

**Author:** ![anon44344346](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon44344346](https://discuss.elastic.co/u/anon44344346)\
**Post date:** [March 11, 2014, 9:15pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287/4 "2014-03-11T21:15:55Z")

</div>

well, I guess it depends of the number of shards, number of replicas  
settings you may have.

say you have 5 shards, 1 replica in your settings.

if you have two nodes up&running, you should have 5 shards in each one.

among those shards, some of them will be primary, some of them will be  
replicas. index ops can only be done in primary shards, read ops can be  
done in either primary shard or replica shard

but which shard is in which node is up to elasticsearch, it can be 3  
primary shards and 2 replica shards on the first node, and the other way  
around on the second, for instance.

there are some tweaks you can do, like shard allocation and the awareness  
setting.

> **[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.

On Tuesday, March 11, 2014 11:36:27 AM UTC-4, Michael Lussier wrote:

> Are you positive you have two nodes up and running? This should be a green  
> state with 2 nodes, 2 shards, 1 replica.
> 
> * * *
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Is-there-any-way-to-force-Replica-inside-particular-Node-tp4051537p4051560.html](http://elasticsearch-users.115913.n3.nabble.com/Is-there-any-way-to-force-Replica-inside-particular-Node-tp4051537p4051560.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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/75ea93b7-422e-4b50-af5e-90e652578d7c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/75ea93b7-422e-4b50-af5e-90e652578d7c%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:44am UTC](https://discuss.elastic.co/t/is-there-any-way-to-force-replica-inside-particular-node/16287/5 "2017-07-06T01:44:07Z")

</div>


