# Shards & Replicas in Cluster

**URL:** <https://discuss.elastic.co/t/shards-replicas-in-cluster/54794>\
**Category:** Elasticsearch\
**Created:** [July 6, 2016, 3:18am UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794 "2016-07-06T03:18:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Shanker\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Ravi\_Shanker\_Reddy](https://discuss.elastic.co/u/Ravi_Shanker_Reddy)\
**Post date:** [July 6, 2016, 3:18am UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794/1 "2016-07-06T03:18:36Z")

</div>

I am using a 2 node cluster both are master and data.

ES version : 2.3.3

Whenever I pushed data from logstash to cluster with a new index name its creating 5 shards (Default) and 5 replicas. But its creating 2 shards primary & 3 replica in one server and 3 primary & 2 replica in one server. But I want to maintain all primary in one server & all replica in another one. How to do this??? Is this the best way to maintain in different servers???

---

<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:** [July 6, 2016, 3:43am UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794/2 "2016-07-06T03:43:25Z")

</div>

You cannot do this.

---

<div class="post-metadata">

**Author:** ![Ravi\_Shanker\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Ravi\_Shanker\_Reddy](https://discuss.elastic.co/u/Ravi_Shanker_Reddy)\
**Post date:** [July 6, 2016, 3:46am UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794/3 "2016-07-06T03:46:10Z")

</div>

What I have to do if I want to remove my replica server from my cluster.

I am chaging `cluster.routing.allocation`but its not becoming primary(which are showing as replica now). What to do in this case..

---

<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:** [July 6, 2016, 3:48am UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794/4 "2016-07-06T03:48:38Z")

</div>

There is no such thing as a replica server in ES. The data is spread across all nodes as evenly as possible.

If you remove a server, any primary shards on the server that is no longer there will be replicated on the other server, so ES will see that and handle it appropriately.

---

<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 5, 2017, 10:37pm UTC](https://discuss.elastic.co/t/shards-replicas-in-cluster/54794/5 "2017-07-05T22:37:44Z")

</div>


