Analyzer ngx-req-latency-distr
Name
ngx-req-latency-distr - HTTP Request Latency Distribution
This analyzer measures the end-to-end latency distribution of HTTP requests in Nginx-based web servers including OpenResty, Kong, and Nginx. It captures timing data from request arrival to response completion, generating histogram visualizations with statistical metrics (min, max, average). The analyzer samples requests over configurable time windows, helping identify latency patterns, performance degradation, and request processing bottlenecks in production environments.
Resource Category
Latency.
Application Type & Technical Stack
- OpenResty
- Nginx
- Kong
- APISIX
Command Line Syntax
The analyzer can be invoked directly on the command-line via the orxray
utility from the openresty-xray-cli software package.
Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).
# PID is the target process PID.
orxray analyzer run ngx-req-latency-distr -p PID
# trace a shell command directly
orxray analyzer run ngx-req-latency-distr -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-req-latency-distr -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run ngx-req-latency-distr --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Histogram Bar Charts
- Plain Texts
Output Example
{
"kind": "ngx-req-latency-distr",
"data": {
"min": 0, "max": 470605, "avg": 7059,
"dist": {
"0": 3, "1": 20, "2": 0, "4": 1, "8": 2, "16": 11,
"32": 1, "64": 8, "128": 11, "256": 1, "512": 5,
"1024": 4, "2048": 1, "4096": 0, "8192": 0,
"16384": 0, "32768": 0, "65536": 0, "131072": 0,
"262144": 1, "524288": 0, "1048576": 0
}
}
}
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.