# What's the frequnce for Rally send bulk requests

**URL:** <https://discuss.elastic.co/t/whats-the-frequnce-for-rally-send-bulk-requests/66665>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [November 21, 2016, 3:33am UTC](https://discuss.elastic.co/t/whats-the-frequnce-for-rally-send-bulk-requests/66665 "2016-11-21T03:33:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xihuanbanku](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xihuanbanku/32/12964_2.png) [@xihuanbanku](https://discuss.elastic.co/u/xihuanbanku)\
**Post date:** [November 21, 2016, 3:33am UTC](https://discuss.elastic.co/t/whats-the-frequnce-for-rally-send-bulk-requests/66665/1 "2016-11-21T03:33:21Z")

</div>

So far as I know, Rally using async HTTP request to bulk index docs. And the implementation is in [driver.py](https://github.com/elastic/rally/blob/master/esrally/driver/driver.py)  
I could perform similar requests using REST client. Consedering that asynchronised request does not wait response from ES server and REST client could send another requet. So, this cause a problem that ES server could not handle so many index requests in a quite short period.

I'm wondering to know, how often does Rally send requests to ES server? How does it calculate the period.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [November 21, 2016, 8:14am UTC](https://discuss.elastic.co/t/whats-the-frequnce-for-rally-send-bulk-requests/66665/2 "2016-11-21T08:14:00Z")

</div>

Hi @xihuanbanku,

Rally issues requests synchronously, so it does wait for a response. We have two benchmarking modes in fact:

- Something that I'd call a **"throughput benchmark"** : Rally issues requests as fast as it can (in a blocking fashion, not async!). This mode is usually used for bulk indexing.
- **Throughput-throttled** : You can also define a target throughput and Rally _aims_ to achieve that throughput. If Elasticsearch responds faster than that, then Rally will wait. If Elasticsearch takes longer than that, then Rally will issue the next request immediately after. So it will try to match the target throughput as close as it can. In fact, if Rally could not reach the target throughput, you will (a) see high latency numbers (much higher than the service time) and (b) this is a sign that your configuration (hardware + ES config) is at or over peak capacity and you should reduce target throughput.

Daniel

---

<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:** [December 19, 2016, 8:14am UTC](https://discuss.elastic.co/t/whats-the-frequnce-for-rally-send-bulk-requests/66665/3 "2016-12-19T08:14:00Z")

</div>

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