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

(Anilkumar) #1

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.

(David Pilato) #2

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?

(Anilkumar) #3

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

(David Pilato) #4

I can't help.

1 Like
(system) closed #5

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