# Replica node

**URL:** https://discuss.elastic.co/t/replica-node/18059
**Category:** Elasticsearch
**Created:** [June 12, 2014, 4:50am UTC](https://discuss.elastic.co/t/replica-node/18059 "2014-06-12T04:50:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tommi\_Latti](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tommi\_Latti](https://discuss.elastic.co/u/Tommi_Latti)
#### Post date: [June 12, 2014, 4:50am UTC](https://discuss.elastic.co/t/replica-node/18059/1 "2014-06-12T04:50:02Z")

</div>

Hi,

Is it possible to configure the ES so that a single node will always get  
the replica shards assigned? When I was in a single-node configuration I  
just upped the number of replicas for every index to 1 and brought a  
data-only node to the cluster and of course the replicas all got created on  
that single node.

But since the indexes rotate every night today I discovered that the next  
index has it's primary shards on this second server which is not exactly  
what I'd like to see...

--  
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/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 12, 2014, 4:57am UTC](https://discuss.elastic.co/t/replica-node/18059/2 "2014-06-12T04:57:30Z")

</div>

You can force it using this sort of process -

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

Though unless you have a good reason, it's best to just let ES do it's own  
thing.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 12 June 2014 14:50, Tommi Lätti [sty@blosphere.net](mailto:sty@blosphere.net) wrote:

> Hi,
> 
> Is it possible to configure the ES so that a single node will always get  
> the replica shards assigned? When I was in a single-node configuration I  
> just upped the number of replicas for every index to 1 and brought a  
> data-only node to the cluster and of course the replicas all got created on  
> that single node.
> 
> But since the indexes rotate every night today I discovered that the next  
> index has it's primary shards on this second server which is not exactly  
> what I'd like to see...
> 
> --  
> 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/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%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/CAEM624ZNWFzk6%2Bb7tJuxUEa35Ss%2BNiCNgBvkoKaRD8d-%2BTWCSw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZNWFzk6%2Bb7tJuxUEa35Ss%2BNiCNgBvkoKaRD8d-%2BTWCSw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![EricMCornelius](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericmcornelius/32/44919_2.png) [@EricMCornelius](https://discuss.elastic.co/u/EricMCornelius)
#### Post date: [June 13, 2014, 3:02am UTC](https://discuss.elastic.co/t/replica-node/18059/3 "2014-06-13T03:02:12Z")

</div>

We're having this same problem, and it looks like the  
index-modules-allocation doesn't actually provide any mechanism to  
accomplish this request.

The primary use-case on our end is that we have a two-tiered cluster with a  
set of indexers and a set of search nodes. We'd like to zone primaries to  
the indexing zone and use asynchronous replication to the search zone.  
Sadly, the shard allocation filtering doesn't seem to provide any  
mechanism to directly enforce this constraint.

The best we've been able to come up with so far, is to use a forced  
awareness attribute and initially zone a new time bin to the indexing zone.  
This causes ES to allocate primaries in the indexing zone with no initial  
replicas. After creation, if we then go back and include the search zone  
for the index (after the primaries are allocated) - replicas are created  
there and everything works as expected.

This strikes me as both a very useful feature to provide fine-grained  
hardware control for different operations, and also an extremely hacky  
work-around the present limitations.

On Thursday, June 12, 2014 12:58:07 AM UTC-4, Mark Walkom wrote:

> You can force it using this sort of process -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html)
> 
> Though unless you have a good reason, it's best to just let ES do it's own  
> thing.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 12 June 2014 14:50, Tommi Lätti \<[s...@blosphere.net](mailto:s...@blosphere.net) \<javascript:\>\>  
> wrote:
> 
> > Hi,
> > 
> > Is it possible to configure the ES so that a single node will always get  
> > the replica shards assigned? When I was in a single-node configuration I  
> > just upped the number of replicas for every index to 1 and brought a  
> > data-only node to the cluster and of course the replicas all got created on  
> > that single node.
> > 
> > But since the indexes rotate every night today I discovered that the next  
> > index has it's primary shards on this second server which is not exactly  
> > what I'd like to see...
> > 
> > --  
> > 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/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/fb45ad0d-7057-4df3-88f5-2a5a03310d7e%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/d6059898-3eac-4d67-9331-ef3e452eea28%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d6059898-3eac-4d67-9331-ef3e452eea28%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:22am UTC](https://discuss.elastic.co/t/replica-node/18059/4 "2017-07-06T01:22:51Z")

</div>


