Latency in retrieving Elastic search response to Java

231 Views Asked by At

I am searching my Elastic index from my Java backend using Elastic's high level REST client for JAVA. I notice that it takes 700 to 800 milliseconds to receive the response from Elastic.

I checked the actual query time in Elastic and it is only 7 milliseconds.

I have built filters and aggregations into my query and also am returning many fields. However, if I remove all filters and aggregations and limit the result set to a single document and only return a single field, the time it takes my Java code to receive the response from Elastic is still > 700ms. Why might this be? My server code is running in California. My Elastic index is served in North Virginia. Perhaps this explains the latency? What else could be the cause?

This is a multisearch containing two search queries.

0

There are 0 best solutions below