Hi.
We're using Elasticsearch very extensively in our Scala (Akka based) system. We currently moved to Java low level rest client and we're experiencing some issues, namely requests take much more time executed with client as opposed to CURL. And also it is much faster on my local machine (querying remote, development server), than on our development environment.
Here's an example:
GET document. Check performances I got with kibana on DEV environment
Got user profile for user 58803851 in 109
Got user profile for user 58803851 in 258
Got user profile for user 58803851 in 144
Got user profile for user 58803851 in 194
Got user profile for user 58803851 in 275
Got user profile for user 58803851 in 495
Got user profile for user 58803851 in 319
Got user profile for user 58803851 in 990
On my local machine it lasts for 75 ms constantly. Via curl it takes approximately 70 ms.
Also, search queries vary on DEV environment and it tales toooo much time.
I use only one instance of client to execute all queries. Few questions:
- Should I maybe create more instance of clients, something like client poll, to make performances better?
- Why on DEV env it works so slow? I know its busier than my local machine, but again it is not so much used, just our QA and DEV team. Also, when I run code locally I point to DEV Elasticsearch cluster
- What could I do to make it faster?
- Can I somehow monitor why some requests from client are slow?
Thanks in advance