Analyzer openresty-cosocket-handshake

Name

openresty-cosocket-handshake - Cosocket SSL Handshake Flame Graph

This analyzer profiles SSL/TLS handshake operations in OpenResty’s cosocket API calls. It captures Lua-level stack traces during sslhandshake() invocations, distinguishing between session-reused connections (marked with ssl-session-reuse at the top of stack) and new session establishments (marked with ssl-session-new). This tool is particularly useful for identifying code paths that fail to utilize SSL session resumption, which can significantly impact performance in high-throughput scenarios. By visualizing the call patterns, developers can pinpoint where session reuse configuration may be missing or ineffective, helping optimize SSL/TLS connection overhead in OpenResty applications.

Resource Category

CPU.

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 openresty-cosocket-handshake -p PID

# trace a shell command directly
orxray analyzer run openresty-cosocket-handshake -c SHELL_CMD

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

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

Tracing Multiple Processes

Supported.

Output Formats

  • Flame Graphs

Author

The OpenResty Inc. Team.

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