Is elasticsearch client is thread safe?


(Rohit Kumar Jain) #1

Hi Geeks,

My question is if elasticsearch client (or es go client) is thread-safe or not?

I mean say suppose I have one es instance is running on 127.0.0.1:9200 and I have multiple indexes and multiple queries to fetch the data from ES. So currently my queries are running in a serial manner but I want my queries to be executed in a parallel manner.

Is it possible to implement using golang ?


(Simon Willnauer) #2

I am not sure about go. The java one is definitely thread safe. @tudor can you answer this?


(Rohit Kumar Jain) #3

Waiting for some inputs....

I mean say suppose I have one es instance is running on 127.0.0.1:9200 and I have multiple indexes and multiple queries to fetch the data from ES. So currently my queries are running in a serial manner but I want my queries to be executed in a parallel manner, example: I want to create a thread t1, which should run on EC1 (Elastic Search Client 1) which should execute my DSL query Q1. Similarly, another thread t2, should run on EC2 (Elastic Search Client 1) which should execute my DSL query Q2 and so on.

Is it possible to implement using golang ?

If someone can help me asap would be really helpful.


(system) #4

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