# Excluding a node from having primary shards

**URL:** <https://discuss.elastic.co/t/excluding-a-node-from-having-primary-shards/13360>\
**Category:** Elasticsearch\
**Created:** [August 28, 2013, 8:27am UTC](https://discuss.elastic.co/t/excluding-a-node-from-having-primary-shards/13360 "2013-08-28T08:27:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_S](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@Thomas\_S](https://discuss.elastic.co/u/Thomas_S)\
**Post date:** [August 28, 2013, 8:27am UTC](https://discuss.elastic.co/t/excluding-a-node-from-having-primary-shards/13360/1 "2013-08-28T08:27:16Z")

</div>

Hey guys,

Is it possible to exclude a node from having primary shards? The use case  
is to have a node at a remote location: The node should have replicas of  
all the shards, but no indexing operations should be routed through it due  
to latency, which is why the shards should never become primaries on that  
node. I looked at the routing / allocation settings but they don't let me  
control whether a node can be primary or not. Any ideas?

Thanks,  
Thomas

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [August 28, 2013, 9:27am UTC](https://discuss.elastic.co/t/excluding-a-node-from-having-primary-shards/13360/2 "2013-08-28T09:27:28Z")

</div>

we don't have a notion for this at this point. The only way I see this  
working is that you restrict the nodes in the remote location from  
allocating anything until the primary is allocated and then allow  
allocation for a certain index again and bump the number of replicas to \> 0

simon

On Wednesday, August 28, 2013 10:27:16 AM UTC+2, Thomas S. wrote:

> Hey guys,
> 
> Is it possible to exclude a node from having primary shards? The use case  
> is to have a node at a remote location: The node should have replicas of  
> all the shards, but no indexing operations should be routed through it due  
> to latency, which is why the shards should never become primaries on that  
> node. I looked at the routing / allocation settings but they don't let me  
> control whether a node can be primary or not. Any ideas?
> 
> Thanks,  
> Thomas

--  
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).  
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:19am UTC](https://discuss.elastic.co/t/excluding-a-node-from-having-primary-shards/13360/3 "2017-07-06T02:19:20Z")

</div>


