# Limiting traffic speed

**URL:** <https://discuss.elastic.co/t/limiting-traffic-speed/276289>\
**Category:** Elasticsearch\
**Created:** [June 17, 2021, 3:48pm UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289 "2021-06-17T15:48:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [June 17, 2021, 3:48pm UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289/1 "2021-06-17T15:48:39Z")

</div>

When transferring shards, the network speed between 2 nodes can increase up to 16 G/s. I want to limit network usage to 7G/s for the entire cluster.  
Can this be done by means of ElasticSearch?

The only network regulator I could find is indices.recovery.max\_bytes\_per\_sec, but it doesn't help

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 19, 2021, 9:59am UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289/2 "2021-06-19T09:59:34Z")

</div>

The default maximum speed is made up of [indices.recovery.max\_bytes\_per\_sec](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/recovery.html#recovery-settings) which defaults at 40mb/s per index, and this is multiplied by [cluster.routing.allocation.node\_concurrent\_recoveries](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/modules-cluster.html#cluster-shard-allocation-settings) which default to 2 (incoming or outgoing), so once cluster is green and rebalance is needed/started, the default speed for shard rebalancing should be around 80Mb/s (2 outgoing or incoming \* 40mb/s)

---

<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:** [June 19, 2021, 12:44pm UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289/3 "2021-06-19T12:44:09Z")

</div>

> [@Julien](#):
>
> this is multiplied by [cluster.routing.allocation.node\_concurrent\_recoveries](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/modules-cluster.html#cluster-shard-allocation-settings)

I don't think that's right,  
`indices.recovery.max_bytes_per_sec` applies in aggregate across all recoveries. Adding concurrent recoveries will often lengthen the overall recovery time.

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 19, 2021, 3:12pm UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289/4 "2021-06-19T15:12:49Z")

</div>

Thank you so 40mb is limit per node shared by all recovery per node, concurrency is detrimental especially on spinning disks so best to increase speed than concurrency

---

<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 17, 2021, 3:13pm UTC](https://discuss.elastic.co/t/limiting-traffic-speed/276289/5 "2021-07-17T15:13:06Z")

</div>

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