I have a query in Elastic Search which is fetching 10000 records having approximately 8MB of data. In the "took" tag in the JSON response, it is showing "1071" . However the response is actually appearing in Kibana after approximately, 6 to 7 seconds later. Same thing is observed, when I am executing it from JAVA API. After doing some googling, I understood that "took" includes only the query execution time in Elastic Search and hence does not include the time for the following:
Sending the response to the server
Deserializing the request from JSON on the server
Serializing the response into JSON on the server
Sending the response over the network
So, given the above scenario, what measures can I take to make sure that it appears in a very reasonable time (in 2 to 3 seconds)?