Difference between request_duration and response_duration prometheus metrics in ingress controller

Viewed 1208

Below 3 metric from ingress controller is available in our prometheus , i am trying to understand the difference between this metrics.

My understanding,

request_duration - time between the request reached in nginx and the response send back to client.

ingress_upstream_latency - time waited in nginx before the upstream server/ pod accepted the request .

response_duration - time to get response from the backend container /pod

# HELP nginx_ingress_controller_request_duration_seconds The request processing time in milliseconds
# TYPE nginx_ingress_controller_request_duration_seconds histogram

# HELP nginx_ingress_controller_ingress_upstream_latency_seconds Upstream service latency per Ingress
# TYPE nginx_ingress_controller_ingress_upstream_latency_seconds summary

# HELP nginx_ingress_controller_response_duration_seconds The time spent on receiving the response from the upstream server
# TYPE nginx_ingress_controller_response_duration_seconds histogram

So as per above metric request_duration = ingress_upstream_latency+ response_duration

  1. when i did some test, i was able to see response_duration is more than request_duration, how that is possible , or by above understanding is wrong . I am trying to understand the difference between this two metrics nginx_ingress_controller_request_duration_seconds and nginx_ingress_controller_response_duration_seconds
0 Answers
Related