Analyzer ngx-proxy-cache-status

Name

ngx-proxy-cache-status - Proxy Cache Status Distribution

This analyzer monitors proxy cache effectiveness in OpenResty, Kong, and Nginx applications. It captures cache status events (HIT, MISS, BYPASS, EXPIRED, etc.) during request processing and aggregates their distribution. The analyzer generates pie charts visualizing cache status proportions, helping evaluate cache hit rates and optimize caching strategies.

Resource Category

Network I/O.

Application Type & Technical Stack

  • OpenResty
  • 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-proxy-cache-status -p PID

# trace a shell command directly
orxray analyzer run ngx-proxy-cache-status -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-proxy-cache-status -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-proxy-cache-status --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Pie Charts
  • Plain Texts

Output Example

{
  "data": [
    {
      "title": "Proxy Cache Status Distribution",
      "subtitle": "3 requestes in 5 secs",
      "type": "pie",
      "id": "",
      "series": {
        "data": {"NONE": 1, "HIT": 1, "MISS": 1},
        "name": "Http Proxy Cache Status",
        "valueUnit": "Reqs"
      },
      "ver": 1,
      "kind": "ngx-proxy-cache-status"
    }
  ],
  "kind": "common"
}

Author

The OpenResty Inc. Team.

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