ngx-req-latency analyzer can be used to analyze the request latency distribution among all the process phases.

For example, one may want to find which phase takes most of the time, the access phase or the upstream phase.

There are four filter conditions. The HTTP status code, request uri, hostname, total request time, upstream process time. You can use the filter conditions to narrow down the request that you are interested in.

By default, the ‘need packets’ option is off. If you toggle it on you may need to change the capturing buffer size as you need.

From the image below, we can see that the access phase took 100ms, and the content phase took 200ms.