What is Query Duration and Request Duration in Kibana?


(Vikas Gopal) #1

Hi Experts,

My Kibana 4.1.1 Discover page is slow , so i want to check the response time of the query . Not sure the exact difference between Query Duration and Request Duration in Kibana statistics .

Thanks
Vikas


(Tim Sullivan) #2

"Query duration" is the time reported by Elasticsearch that it took to process the query.

"Request duration" is the time measured by Kibana to go from request to response. That time includes serializing the request data into JSON, sending the request over the network, deserializing the JSON on the Elasticsearch server, processing the query, serializing the response into JSON, sending the response over the network, and deserializing the response on the client.


(Vikas Gopal) #3

WOW !! thanks for the clarification Tim,

So Request Duration is the one which tells us the complete picture of the Kibana Discover page processing . Please correct me if I am wrong , Request duration = Query duration + time includes serializing the request data into JSON, sending the request over the network, deserializing the JSON on the Elasticsearch server, processing the query, serializing the response into JSON, sending the response over the network, and deserializing the response on the client.


(Tim Sullivan) #4

That's correct. The request duration includes the query duration time.

The query duration is not a complete picture of what happens on the Kibana Discover page, it is just the picture of what happens for Elasticsearch to process the query into the result data. You can find that result data in its raw form in Kibana under the "Response" tab and it will show JSON that has a field called took - "query time" is populated by that field.


(Vikas Gopal) #5

Thanks Alot Tim , I understood it completely .


(system) #6