# How to create replica only Node?

**URL:** <https://discuss.elastic.co/t/how-to-create-replica-only-node/22476>\
**Category:** Elasticsearch\
**Created:** [March 2, 2015, 7:46pm UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476 "2015-03-02T19:46:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davinder\_Deol](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Davinder\_Deol](https://discuss.elastic.co/u/Davinder_Deol)\
**Post date:** [March 2, 2015, 7:46pm UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476/1 "2015-03-02T19:46:39Z")

</div>

We have a requirement where we want to create a node and ask it to join the  
cluster. But we don't want this node to have primary shard.

it is like a Disaster scenario where I have a node running on disaster  
server but that node will never have primary shards of my index. It can  
only have replica of my index.

So we looking for a way to configure node or index to control where to  
place primary and replica shards?

Thanks

--  
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/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 2, 2015, 9:05pm UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476/2 "2015-03-02T21:05:56Z")

</div>

All shards are created equally. Elasticsearch promotes replica  
automatically to primaries if necessary. So there is no reason for any  
headache around primary/replica locations, ES manages node disaster  
automatically.

Jörg

On Mon, Mar 2, 2015 at 8:46 PM, Davinder Deol [davinder.deol@gmail.com](mailto:davinder.deol@gmail.com)  
wrote:

> We have a requirement where we want to create a node and ask it to join  
> the cluster. But we don't want this node to have primary shard.
> 
> it is like a Disaster scenario where I have a node running on disaster  
> server but that node will never have primary shards of my index. It can  
> only have replica of my index.
> 
> So we looking for a way to configure node or index to control where to  
> place primary and replica shards?
> 
> Thanks
> 
> --  
> 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/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoGmJJrBL%3DfgY32tquA7r1kJVEj-r6yBRADOmMFNCzfkNA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGmJJrBL%3DfgY32tquA7r1kJVEj-r6yBRADOmMFNCzfkNA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Davinder\_Deol](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Davinder\_Deol](https://discuss.elastic.co/u/Davinder_Deol)\
**Post date:** [March 3, 2015, 12:16am UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476/3 "2015-03-03T00:16:33Z")

</div>

Thanks Jörg for the reply.

I agree Elasticsearch is good in managing primary/replica shards allocation.

But we have to need where we want some nodes to never have primary shards  
so I was curious to know is there any node or index level setting which we  
can use for this?

Thanks

On Monday, March 2, 2015 at 1:06:03 PM UTC-8, Jörg Prante wrote:

> All shards are created equally. Elasticsearch promotes replica  
> automatically to primaries if necessary. So there is no reason for any  
> headache around primary/replica locations, ES manages node disaster  
> automatically.
> 
> Jörg
> 
> On Mon, Mar 2, 2015 at 8:46 PM, Davinder Deol \<[davind...@gmail.com](mailto:davind...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > We have a requirement where we want to create a node and ask it to join  
> > the cluster. But we don't want this node to have primary shard.
> > 
> > it is like a Disaster scenario where I have a node running on disaster  
> > server but that node will never have primary shards of my index. It can  
> > only have replica of my index.
> > 
> > So we looking for a way to configure node or index to control where to  
> > place primary and replica shards?
> > 
> > Thanks
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 3, 2015, 12:54pm UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476/4 "2015-03-03T12:54:19Z")

</div>

Strange requirement, but you can tag nodes with a shard allocation filter

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

and then you can create an index with replica level 0 that will be created  
only on the tagged nodes. After that you can remove the allocation filter  
and increase replica level. Do not forget to check if index recovery and  
restarting ES will work as expected.

Jörg

On Tue, Mar 3, 2015 at 1:16 AM, Davinder Deol [davinder.deol@gmail.com](mailto:davinder.deol@gmail.com)  
wrote:

> Thanks Jörg for the reply.
> 
> I agree Elasticsearch is good in managing primary/replica shards  
> allocation.
> 
> But we have to need where we want some nodes to never have primary shards  
> so I was curious to know is there any node or index level setting which we  
> can use for this?
> 
> Thanks
> 
> On Monday, March 2, 2015 at 1:06:03 PM UTC-8, Jörg Prante wrote:
> 
> > All shards are created equally. Elasticsearch promotes replica  
> > automatically to primaries if necessary. So there is no reason for any  
> > headache around primary/replica locations, ES manages node disaster  
> > automatically.
> > 
> > Jörg
> > 
> > On Mon, Mar 2, 2015 at 8:46 PM, Davinder Deol [davind...@gmail.com](mailto:davind...@gmail.com)  
> > wrote:
> > 
> > > We have a requirement where we want to create a node and ask it to join  
> > > the cluster. But we don't want this node to have primary shard.
> > > 
> > > it is like a Disaster scenario where I have a node running on disaster  
> > > server but that node will never have primary shards of my index. It can  
> > > only have replica of my index.
> > > 
> > > So we looking for a way to configure node or index to control where to  
> > > place primary and replica shards?
> > > 
> > > Thanks
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoER\_deDJqO%2Byb9c%2BjSOsQAn\_SRBdb1RL6hsb%3DberCUyyg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoER_deDJqO%2Byb9c%2BjSOsQAn_SRBdb1RL6hsb%3DberCUyyg%40mail.gmail.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, 12:28am UTC](https://discuss.elastic.co/t/how-to-create-replica-only-node/22476/5 "2017-07-06T00:28:53Z")

</div>


