Analyzer ngx-brotli-compression-types

Name

ngx-brotli-compression-types - Nginx Brotli Compression Types Statistics

This analyzer collects statistics on MIME types configured for Brotli compression in nginx-based applications such as OpenResty and Kong. It monitors the brotli_types directive usage across server configurations, capturing the frequency of Brotli compression applied to different content types. The analyzer generates bar chart visualizations showing the distribution of compressed MIME types, helping administrators verify modern compression policies and optimize bandwidth efficiency for various content categories.

Resource Category

CPU.

Application Type & Technical Stack

  • OpenResty
  • Nginx
  • APISIX
  • Kong

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-brotli-compression-types -p PID

# trace a shell command directly
orxray analyzer run ngx-brotli-compression-types -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-brotli-compression-types -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-brotli-compression-types --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Bar Charts
  • Plain Texts

Output Example

{
  "total_cnt": 16,
  "upstream_cnt": 0,
  "types": {
      "text/html": {
          "6": 16  // the compression level is 6, the request count of this level is 16
      }
  }
}

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.