How many simultaneous queries can I send to the ElasticSearch cluster?

I want to send multiple bulk operation requests to an ElasticSearch cluster, and I am facing this problem EsRejectedExecutionException[rejected execution (queue capacity 50) on org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction

I have a cluster of 4 instances of ElasticSearch (version 1.3.4) when I sent this request to get the size of its pool of streams of bulk operation:

 GET /_cat/thread_pool?v&h=host,bulk.active,bulk.queueSize 

I got

 host bulk.active bulk.queueSize 1D4HPY1 0 50 1D4HPY2 0 50 1D4HPY3 0 50 1D4HPY4 0 50 

So, how many simultaneous requests for a bulk operation can I send to this cluster? 50 or 200 ?

+5
source share
1 answer

I would suggest looking at this section from the documentation .

In addition, you need to be more specific when you say โ€œconcurrent requests you can sendโ€ because, as you see on the page above, there are different thread pools that handle different jobs. You give an example in your post for bulk operations.

In my opinion, the correct request for โ€œbulkโ€ to see the number of simultaneous threads started (according to this part of the documentation ) is GET /_cat/thread_pool?v&h=host,bulk.queueSize,bulk.min,bulk.max . Thus, in the thread pool there are bulk.max active threads with the number of bulk.queueSize tasks in the queue for it. When a request arrives and there are no threads to process it, the request is queued.

+4
source

Source: https://habr.com/ru/post/1205103/


All Articles