server_traffic_status_histogram_buckets

Defines the histogram buckets for the server traffic status measurements in the NGINX stream module.

Syntaxserver_traffic_status_histogram_buckets bucket1 bucket2 ...;
Defaultnone
Contextstream, stream server
Arguments1+

Description

The server_traffic_status_histogram_buckets directive configures the histogram buckets used to categorize the latency and response time data of traffic processed by the server. By specifying one or more arguments, each representing the maximum value of a bucket, the user can customize the granularity of traffic statistics collected by the NGINX stream server traffic status module. This allows for differentiation in metrics reporting for various ranges of response times, enhancing the ability to monitor application performance and identify bottlenecks.

Each specified bucket value must be in increasing order, ensuring that lower values correspond to lower latency measurements. The histogram is particularly useful for performance tuning and provides insights into the distribution of response times, which can help in understanding user experience and server performance under different loads. The directive is often used in conjunction with the server_traffic_status to enable traffic status reporting on the server level.

Config Example

stream {
    server {
        listen 1234;
        server_traffic_status;
        server_traffic_status_histogram_buckets 10 50 100 200;
    }
}

Ensure all bucket values are specified in increasing order to avoid configuration errors.

Be wary that overly granular bucket values may lead to inflation in traffic status data size.

When no buckets are defined, the traffic status reporting may not work optimally.

← Back to all directives