# Question about Rebalancing and data loss

**URL:** <https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662>\
**Category:** Elasticsearch\
**Created:** [March 27, 2014, 11:22pm UTC](https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662 "2014-03-27T23:22:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagarit2](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sagarit2](https://discuss.elastic.co/u/sagarit2)\
**Post date:** [March 27, 2014, 11:22pm UTC](https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662/1 "2014-03-27T23:22:47Z")

</div>

Hi ,

We have recently started using elasticsearch and I have very basic question  
about how rebalancing works between nodes if shards are being moved due to  
a failure.

eg.

Lets say we have ES deployed in AWS Ec2 region and replicas are "Zone  
Aware" and num of replicas = 1.

Considering that we have 3 zones in Ec2, if One entire zone goes down, ES  
will start rebalancing shards associated with failed zone to remaining Two  
zones.

And before rebalancing is complete (entire data set is not yet copied), if  
failed zone comes back up again, does ES try to rebalance (or move) shards  
which have partial data to the new zone ?

or does it wait for previous rebalancing to finish (until entire data set  
is copied) and then start rebalancing again ?

If answer is former then will there be any data loss due to moving shards  
with partial data ?

Thanks,

--  
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/e33f1b7b-d27a-48dd-8b55-d101bc2cd779%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e33f1b7b-d27a-48dd-8b55-d101bc2cd779%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sagarit2](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sagarit2](https://discuss.elastic.co/u/sagarit2)\
**Post date:** [March 31, 2014, 4:44am UTC](https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662/2 "2014-03-31T04:44:19Z")

</div>

Does anybody know about this ?

Thanks,

On Thursday, March 27, 2014 4:22:47 PM UTC-7, sagarl wrote:

> Hi ,
> 
> We have recently started using elasticsearch and I have very basic  
> question about how rebalancing works between nodes if shards are being  
> moved due to a failure.
> 
> eg.
> 
> Lets say we have ES deployed in AWS Ec2 region and replicas are "Zone  
> Aware" and num of replicas = 1.
> 
> Considering that we have 3 zones in Ec2, if One entire zone goes down, ES  
> will start rebalancing shards associated with failed zone to remaining Two  
> zones.
> 
> And before rebalancing is complete (entire data set is not yet copied), if  
> failed zone comes back up again, does ES try to rebalance (or move) shards  
> which have partial data to the new zone ?
> 
> or does it wait for previous rebalancing to finish (until entire data set  
> is copied) and then start rebalancing again ?
> 
> If answer is former then will there be any data loss due to moving shards  
> with partial data ?
> 
> Thanks,

--  
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/a3074a59-9b3c-48af-b28d-6fa977e6ed7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a3074a59-9b3c-48af-b28d-6fa977e6ed7b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [March 31, 2014, 9:34pm UTC](https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662/3 "2014-03-31T21:34:06Z")

</div>

Replicas will be recovered to meet your replica count requirements. If a  
node comes down, and then recovery happens, and then the node comes back,  
recovery will run until it is complete after which a rebalance may happen.  
No data loss will happen at any point.

--  
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/8b64dd27-e9c5-40d9-9abb-cef9bf78c6c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8b64dd27-e9c5-40d9-9abb-cef9bf78c6c3%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:39am UTC](https://discuss.elastic.co/t/question-about-rebalancing-and-data-loss/16662/4 "2017-07-06T01:39:11Z")

</div>


