Hello,
I was doing a performance test on my system. In my test, Java High-Level Client makes ~800 RPS for a simple get request. When I change the implementation and use Java Low-Level Client, it reaches to ~1750 RPS. When I directly send the requests to ES for same get query I easy reach to ~8k RPS.
I am using 6.0.1
I wonder what I am doing wrong? Or is there performance difference on java client?
As far as I understand you have benchmarked three scenarios:
"Directly" sending requests to Elasticsearch: Not sure what this is, probably curl or just sending a raw string via a HTTP client library?
Low-level client
High-level client
W.r.t. to the use case: I am not so sure issuing a get request over and over is such a useful and realistic benchmark to begin with. If you need to retrieve a lot of documents by id, it would make sense to leverage batching and use the mget API instead.
It depends a bit how you setup your benchmark and measure but in general I'd expect that the high-level client is a bit slower because it needs to serialize and deserialize data? In your scenario it is quite a bit slower though. I suggest that you attach a Java profiler to the client application so you can see where the hot spots are (serializing data, sending them, establishing a connection, etc. etc). That might reveal further steps that you need to take.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.