Analyzer ngx-tls-handshake-latency

Name

ngx-tls-handshake-latency - Nginx SSL/TLS handshake Latency

This analyzer measures SSL/TLS handshake latency across different phases in Nginx-based applications. It tracks timing for client hello, server hello, key exchange, and server finished messages. The analyzer generates histogram distributions showing latency patterns for each handshake phase, helping identify SSL/TLS performance bottlenecks, certificate validation delays, and cryptographic operation overhead.

Resource Category

Latency.

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-tls-handshake-latency -p PID

# trace a shell command directly
orxray analyzer run ngx-tls-handshake-latency -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-tls-handshake-latency -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-tls-handshake-latency --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Histogram Bar Charts
  • Plain Texts

Output Example

{
  "distributions": {
    "total": [
      {"count": 16, "key": "1024"},
      {"count": 18, "key": "2048"}
    ],
    "client_hello": [
      {"count": 0, "key": "32768"},
      {"count": 2, "key": "65536"}
    ],
    "server_hello": [
      {"count": 1, "key": "128"},
      {"count": 33, "key": "256"},
    ]
  },
  "unit": "us",
  "summary": {
    "total": {"min": 1562, "max": 95511, "count": 39, "sum": 275464},
    "client_hello": {"min": 104, "max": 93933, "count": 42, "sum": 205464},
    "server_hello": {"min": 233, "max": 1155, "count": 39, "sum": 17151}
  }
}

Author

The OpenResty Inc. Team.

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