Java High Level Rest Client response time is lower than Transport client

I have upgraded code from transport client to High Level client.
Java: JDK 8
ES version: 6.5.4

When api response time of transport client is compared to High Level client, there is a difference, especially EXTERNAL-CALL, i.e., org.elasticsearch.client.RestHighLevelClient operation is taking more time.

RestHighLevel client is initialised and used in standard way.

HttpHost httpHosts = // code to get hosts;

RestClientBuilder builder = RestClient.builder(httpHosts);
RestHighLevelClient restHighLevelClient = new RestHighLevelClient(builder.getRestClient());

Please suggest me if there is any way to tune for better response time and performance.

You should not really see a notable difference of the response time.

Could you share the test code you are using with the Transport Client and the Rest Client? Also the measured time for both against the exact same dataset using the exact same queries?

I am not able to share due to restrictions. I used elastic search Query builders, SearchRequest and finally used search method of RestHighLevelClient to search in Elastic Search.

Time took for
Transport client is < 2000 ms
RestHighLevelClient is > 3000 ms

I can't help.

1 Like

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