# How Replica from one node to another will move?

**URL:** <https://discuss.elastic.co/t/how-replica-from-one-node-to-another-will-move/201771>\
**Category:** Elasticsearch\
**Created:** [October 1, 2019, 10:16am UTC](https://discuss.elastic.co/t/how-replica-from-one-node-to-another-will-move/201771 "2019-10-01T10:16:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saptha\_AD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saptha_ad/32/48651_2.png) [@Saptha\_AD](https://discuss.elastic.co/u/Saptha_AD)\
**Post date:** [October 1, 2019, 10:16am UTC](https://discuss.elastic.co/t/how-replica-from-one-node-to-another-will-move/201771/1 "2019-10-01T10:16:29Z")

</div>

I have a 3 node cluster with 2 master eligible and all are data node & ingest node.  
Setting is 1 Primary Shard and 1 Replica shard.  
I have one index "nginx-2019.09"

For example Node "A" is master node and haves a Primary Shard of index. Node "B" has a Replica of the index. Node "C" is idle as of now.

Suddenly Node "B" went down in the cluster, Master node decides to use Node "C" as a replica for the index. Now Node "C" have whole index date up to date.

After few days back Node "B" joins the cluster. My questions are

1. Now again Node B will become a Replica or Node C will continue as replica?
2. If Node C continues as replica, What happens to the replica data which Node B has?
3. Else If Node B elected as new replica, all the data from primary shard gets copied to Node B and Node C data will be deleted?

Kindly clarify my doubt

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 1, 2019, 11:15am UTC](https://discuss.elastic.co/t/how-replica-from-one-node-to-another-will-move/201771/2 "2019-10-01T11:15:30Z")

</div>

> [@Saptha\_AD](#):
>
> I have a 3 node cluster with 2 master eligible and all are data node & ingest node.

If you have a three-node cluster then all three nodes should be master-eligible. If you have two master-eligible nodes then your cluster is not fault tolerant.

> [@Saptha\_AD](#):
>
> - Now again Node B will become a Replica or Node C will continue as replica?

Node C will continue as the replica.

> [@Saptha\_AD](#):
>
> - If Node C continues as replica, What happens to the replica data which Node B has?

Node B will ensure that the data is safely stored elsewhere in the cluster and will then delete its own stale copy to free up the disk space for something else.

---

<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:** [October 29, 2019, 11:15am UTC](https://discuss.elastic.co/t/how-replica-from-one-node-to-another-will-move/201771/3 "2019-10-29T11:15:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
