# Disable master shard allocation on particular nodes

**URL:** <https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699>\
**Category:** Elasticsearch\
**Created:** [May 14, 2015, 4:20pm UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699 "2015-05-14T16:20:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petrovich](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@Petrovich](https://discuss.elastic.co/u/Petrovich)\
**Post date:** [May 14, 2015, 4:20pm UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699/1 "2015-05-14T16:20:25Z")

</div>

Are there any way to disable master shard allocation on particular nodes?  
I've found inserts into elasticsearch run much faster if master shard is on the same datacenter. And I have datacenters with read-only elastic. So I need a way to disable some nodes to have master shard.

---

<div class="post-metadata">

**Author:** ![emptyemail](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@emptyemail](https://discuss.elastic.co/u/emptyemail)\
**Post date:** [May 14, 2015, 6:03pm UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699/2 "2015-05-14T18:03:23Z")

</div>

I am having a similar issue, when using cluster awareness I want to be able to control which zone has all the primary shards. Can't seem to find a way to do that though.

---

<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:** [May 14, 2015, 9:27pm UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699/3 "2015-05-14T21:27:22Z")

</div>

We don't recommend cross-DC cluster for reasons such as this (the slow insert issue that is).

Other than doing manual allocation, there is no way to do this.

---

<div class="post-metadata">

**Author:** ![emptyemail](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@emptyemail](https://discuss.elastic.co/u/emptyemail)\
**Post date:** [May 15, 2015, 3:31am UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699/4 "2015-05-15T03:31:44Z")

</div>

In this case I am interested in having both zones in the same dc. one is a pool of servers that can be scaled up/down on demand with no downtime. Right now if I loose too many shards at the same time, the cluster starts timing out while new primary shards are being elected. It will work itself out eventually but I'd rather avoid the downtime.

---

<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:13am UTC](https://discuss.elastic.co/t/disable-master-shard-allocation-on-particular-nodes/699/5 "2017-07-06T00:13:55Z")

</div>


