# Elasticsearch can't handle multiple requests without dramatically decrease its performance

**URL:** <https://discuss.elastic.co/t/elasticsearch-cant-handle-multiple-requests-without-dramatically-decrease-its-performance/115938>\
**Category:** Elasticsearch\
**Created:** [January 17, 2018, 7:09pm UTC](https://discuss.elastic.co/t/elasticsearch-cant-handle-multiple-requests-without-dramatically-decrease-its-performance/115938 "2018-01-17T19:09:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![montenegrodr](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@montenegrodr](https://discuss.elastic.co/u/montenegrodr)\
**Post date:** [January 17, 2018, 7:09pm UTC](https://discuss.elastic.co/t/elasticsearch-cant-handle-multiple-requests-without-dramatically-decrease-its-performance/115938/1 "2018-01-17T19:09:53Z")

</div>

I have a two node cluster hosted in ElasticCloud.

```
Host Elastic Cloud
Platform Google Cloud
Region US Central 1 (Iowa)
Memory 8 GB
Storage 192 GB
SSD Yes
HA Yes

```

Each node has:

```
Allocated Processors 2
Number of processors 2
Number of indices 4*
Shards (p/ index) 5*
Number of replicas 1
Number of document 150M
Allocated Disk 150GB

```

_\* the main indices, kibana and watcher creates a bunch of small indices._

My documents are mostly text. There are some other fields (no more than 5 per index), no nested objects. Indices specs:

```
| Index | Avg Doc Length | # Docs | Disk |
|---------|----------------|--------|------|
| index-1 | 300 | 80M | 70GB |
| index-2 | 500 | 5M | 5GB |
| index-3 | 3000 | 2M | 10GB |
| index-4 | 2500 | 18M | 54GB |

```

When system is idle, response time (load time) is typically few seconds. But when I simulate the behavior of 10 users I start to get timeouts in my application. Originally timeout was 10s, I updated it to 60s and I am still having issues. Here follows a chart for simulation of 10 concurrent users using Search Api.

[![](https://i.stack.imgur.com/MXtqr.png) ](https://i.stack.imgur.com/MXtqr.png)

Red line is total request time in seconds and dotted pink line is my 60 seconds timeout. So, I'd say in most of the times my users will experience a timeout. The query I've used is quite simple:

```
{
    "size": 500,
    "from": ${FROM},
    "query":{
        "query_string": {
            "query": "good OR bad"
        }
    }
}

```

I've tried all possible tweaks that came to my knowledge. I don't know if that is the real ES performance and I have to accept it and upgrade my plan.

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [January 19, 2018, 1:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cant-handle-multiple-requests-without-dramatically-decrease-its-performance/115938/2 "2018-01-19T13:13:32Z")

</div>

are you fetching top N documetns or do you do deep pagination? If you consume all hits for a given query use a [scroll request](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-request-scroll.html) or if you can try [search\_after](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-request-search-after.html) which does what you want efficiently. Also note ES is a top N retrieval engine which means like the top 10 or 100 docs not all docs. Yet, you can still do it.

---

<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:** [February 16, 2018, 1:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cant-handle-multiple-requests-without-dramatically-decrease-its-performance/115938/3 "2018-02-16T13:13:36Z")

</div>

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