# Shard replication mechanism?

**URL:** https://discuss.elastic.co/t/shard-replication-mechanism/5055
**Category:** Elasticsearch
**Created:** [August 4, 2011, 2:47pm UTC](https://discuss.elastic.co/t/shard-replication-mechanism/5055 "2011-08-04T14:47:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fnord\_99](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@fnord\_99](https://discuss.elastic.co/u/fnord_99)
#### Post date: [August 4, 2011, 2:47pm UTC](https://discuss.elastic.co/t/shard-replication-mechanism/5055/1 "2011-08-04T14:47:27Z")

</div>

Hi guys,

I'm playing around a little bit with ES and now have an index with 35 Shards  
and 1 Replica that I wanted to scale up to 20 replicas (on 21 nodes). While  
performing the replication increase I have observed that it is overall very  
slow. The servers are interconnected with bonded Gigabit network cables  
within the same switch (giving 2Gbit/server). So I would assume that a  
throughput of 100MByte/s between two nodes (!) would be achievable at least.  
However, checking IO performance with iotop, the average "replication rate"  
for the total cluster (!) is at approximately 20 MByte /sec which is awfully  
slow.

I'm interested now in how elasticsearch does replicate from one server to  
another. Is there a specific algorithm behind it and how does it work? Why  
is the replication rate so slow? Are there any possibilities to increase the  
speed?

Thanks already in advance a lot for your help!

Cheers,  
fnord

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 4, 2011, 5:50pm UTC](https://discuss.elastic.co/t/shard-replication-mechanism/5055/2 "2011-08-04T17:50:08Z")

</div>

First, to scale to 20 nodes you don't need to increase the replica count to  
20. You have 35 shards with 1 replica, thats 70 shards to be distributed  
across the available machines.

Regarding the throughput that you see, there is throttling in the number of  
parallel transfers happening to perform recovery (whcih happens when you add  
a replica, where the new shard will recover from the primary shard). The  
throttling is there so it won't interfere with ongoing search and indexing  
requests.

On Thu, Aug 4, 2011 at 5:47 PM, fnord 99 [fnord999@googlemail.com](mailto:fnord999@googlemail.com) wrote:

> Hi guys,
> 
> I'm playing around a little bit with ES and now have an index with 35  
> Shards and 1 Replica that I wanted to scale up to 20 replicas (on 21 nodes).  
> While performing the replication increase I have observed that it is overall  
> very slow. The servers are interconnected with bonded Gigabit network cables  
> within the same switch (giving 2Gbit/server). So I would assume that a  
> throughput of 100MByte/s between two nodes (!) would be achievable at least.  
> However, checking IO performance with iotop, the average "replication rate"  
> for the total cluster (!) is at approximately 20 MByte /sec which is awfully  
> slow.
> 
> I'm interested now in how elasticsearch does replicate from one server to  
> another. Is there a specific algorithm behind it and how does it work? Why  
> is the replication rate so slow? Are there any possibilities to increase the  
> speed?
> 
> Thanks already in advance a lot for your help!
> 
> Cheers,  
> fnord

---

<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, 3:58am UTC](https://discuss.elastic.co/t/shard-replication-mechanism/5055/3 "2017-07-06T03:58:16Z")

</div>


