Java Rest Client time cost confusion

Hi,I have been confused by time cost of Java Rest Client . I use Java Rest Client (6.6.0 vesion)to send requst to ES. Here is my basic config for REST Client:
private static final int CONNECT_TIMEOUT = 10000;
private static final int SOCKET_TIMEOUT = 10000;
private static final int CONNECTION_REQUEST_TIMEOUT = 10000;
private static final int MAX_CONNECT_NUM = 300;
private static final int MAX_CONNECT_PER_ROUTE = 200;
We have a api which is a msearch request, and use CAT to detect the api performance. To our surprise,mearcha api time cost is under 60ms at most of the time,however sometime it will be over 400ms. At same time,network IO of ES cluster is normal . Accroding to my study, Java Rest Client use HttpAsyncClient to send request, and has a connection manager pool,so time cost of request should not be tremble. Additionlly, I have tried to use CURL tool to send simple GET periodically by shell on Linux OS, and show that 'time_starttransfer' is sometime high (over 300ms).

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