OpenResty Execution Phases: Lua Execution Order and Choosing *_by_lua

  • OpenResty phases and directives at a glance
  • Why Lua execution order differs from configuration order
  • Choosing rewrite, access, and content
  • Verifying phase behavior with a small gateway
  • API restrictions and common problems
  • OpenResty phases and directives at a glance
  • Why Lua execution order differs from configuration order
  • Choosing rewrite, access, and content
  • Verifying phase behavior with a small gateway
  • API restrictions and common problems

The OpenResty Process Model: Workers, Lua VMs, and State During Reloads

  • How requests, workers, and Lua VMs relate
  • Why each worker has its own Lua module state
  • How worker count multiplies caches and connections
  • Why old and new code can run together during a reload
  • How requests, workers, and Lua VMs relate
  • Why each worker has its own Lua module state
  • How worker count multiplies caches and connections
  • Why old and new code can run together during a reload

OpenResty Components: Modules, Lua Libraries, and How to Check Them

  • What common components do
  • The difference between NGINX modules and Lua libraries
  • Where components are installed
  • Checking which components your installation includes
  • Common questions
Photo by Yichun Zhang
  • What common components do
  • The difference between NGINX modules and Lua libraries
  • Where components are installed
  • Checking which components your installation includes
  • Common questions

OpenResty vs. NGINX: When the Gateway Starts Running Business Logic

  • What OpenResty solves as gateways accumulate business logic
  • When OpenResty is needed compared with vanilla NGINX and njs
  • Performance differences and migration considerations
Photo by Yichun Zhang
  • What OpenResty solves as gateways accumulate business logic
  • When OpenResty is needed compared with vanilla NGINX and njs
  • Performance differences and migration considerations

What Is OpenResty? From Nginx and LuaJIT to Real-World Use Cases

  • What OpenResty Is Used For
  • How OpenResty Works
  • Do You Need to Know Lua?
  • Is OpenResty a Web Server? How Does It Relate to Nginx?
  • What OpenResty Is Made Of
  • Who Uses OpenResty
  • Who Maintains OpenResty
  • FAQ
Photo by Yichun Zhang
  • What OpenResty Is Used For
  • How OpenResty Works
  • Do You Need to Know Lua?
  • Is OpenResty a Web Server? How Does It Relate to Nginx?
  • What OpenResty Is Made Of
  • Who Uses OpenResty
  • Who Maintains OpenResty
  • FAQ

Install OpenResty - Complete Setup Guide for All Platforms

  • Supported Platforms
  • Quick Start (Ubuntu / Debian)
  • Platform Installation Guides
  • ARM64 / Aarch64
  • Alpine Linux
  • macOS & Building from Source
  • Verify Your Installation
  • FAQ
  • Supported Platforms
  • Quick Start (Ubuntu / Debian)
  • Platform Installation Guides
  • ARM64 / Aarch64
  • Alpine Linux
  • macOS & Building from Source
  • Verify Your Installation
  • FAQ

Minify HTML, CSS & JS Inside Nginx: OpenResty's 120 MB/s Streaming Minifiers

  • Why minification moves to the Nginx gateway when the build cannot change
  • Three problems real-time HTML, CSS, and JS minification must solve
  • Why body_filter_by_lua and sub_filter are not enough
  • How openresty-minifiers combines syntax awareness, streaming, and O(1) memory
  • What 120+ MB/s per core means for production traffic
  • How to choose the right use case and validate it on real traffic
  • Why minification moves to the Nginx gateway when the build cannot change
  • Three problems real-time HTML, CSS, and JS minification must solve
  • Why body_filter_by_lua and sub_filter are not enough
  • How openresty-minifiers combines syntax awareness, streaming, and O(1) memory
  • What 120+ MB/s per core means for production traffic
  • How to choose the right use case and validate it on real traffic

Introduction to OpenResty XRay

  • Core Philosophy: A Tracing Engine Built for the Unknown
  • Turning Noise into Signal: How XRay Demystifies Production Issues
  • Empowering Engineering Teams in Cloud-Native Reality
  • Built on a Robust, Open Technological Foundatione
  • Real-World Success Stories
  • Core Philosophy: A Tracing Engine Built for the Unknown
  • Turning Noise into Signal: How XRay Demystifies Production Issues
  • Empowering Engineering Teams in Cloud-Native Reality
  • Built on a Robust, Open Technological Foundatione
  • Real-World Success Stories

Nginx Reverse Proxy QPS Dropped 15x: A Missing upstream keepalive and an -O0 Debug Build

  • A 15x Slower Nginx Reverse Proxy β€” and No Errors in the Logs
  • Flame Graphs Expose a Connection Storm: The Missing upstream keepalive
  • The Remaining 10% Gap: Baseline Comparison Points to the Compiler
  • How an -O0 Debug Build Cost Us 10% of Performance
  • A 15x Slower Nginx Reverse Proxy β€” and No Errors in the Logs
  • Flame Graphs Expose a Connection Storm: The Missing upstream keepalive
  • The Remaining 10% Gap: Baseline Comparison Points to the Compiler
  • How an -O0 Debug Build Cost Us 10% of Performance

TLS Session Resumption Across Nginx Clusters: Key Rotation Without Reload

  • Why a session ticket triggers a full handshake on another Nginx node
  • How reload-based rotation compares with long-lived keys
  • How lua-resty-tls-session syncs and rotates keys without reloads
  • Comparing three TLS Session Ticket Key rotation strategies
  • Which Nginx clusters are most likely to benefit
  • Why a session ticket triggers a full handshake on another Nginx node
  • How reload-based rotation compares with long-lived keys
  • How lua-resty-tls-session syncs and rotates keys without reloads
  • Comparing three TLS Session Ticket Key rotation strategies
  • Which Nginx clusters are most likely to benefit

Nginx C++ Module Memory Leak: Root Cause in Production, No Restart

  • The Production Challenge: A C++ Module Memory Leak You Can’t Debug With GDB
  • How the Flame Graph Pinpointed the Leaking Function in ngx_dubbo_module
  • From Reactive to Proactive: XRay’s New Approach to Troubleshooting
  • The OpenResty XRay Closed-Loop Approach
  • The Production Challenge: A C++ Module Memory Leak You Can’t Debug With GDB
  • How the Flame Graph Pinpointed the Leaking Function in ngx_dubbo_module
  • From Reactive to Proactive: XRay’s New Approach to Troubleshooting
  • The OpenResty XRay Closed-Loop Approach

The Nginx Worker That Refused to Serve More Than 300 RPS: Traced to a 75ms Event-Loop Block

  • High Load but No Useful Work: CPU Contention from a Missing worker_cpu_affinity
  • How Blocking Lua I/O Calls Halted the Nginx Event Loop
  • Measuring File I/O Latency: Up to 1.5ms per Call
  • How Bad Was the Nginx Event-Loop Blocking? 43,952 Samples, a 75ms Worst Case
  • Frequently Asked Questions
  • High Load but No Useful Work: CPU Contention from a Missing worker_cpu_affinity
  • How Blocking Lua I/O Calls Halted the Nginx Event Loop
  • Measuring File I/O Latency: Up to 1.5ms per Call
  • How Bad Was the Nginx Event-Loop Blocking? 43,952 Samples, a 75ms Worst Case
  • Frequently Asked Questions

Nginx Core Dump Analysis: Catch a Worker Process Crash at the First Scene

  • The Case: Frequent Nginx Worker Process Crashes No Log Could Explain
  • Analyzing the Recording: Replaying the Crash Back to the First Scene
  • Root Cause: A Use-After-Free in Nginx’s Connection Lifecycle
  • Frequently Asked Questions
  • The Case: Frequent Nginx Worker Process Crashes No Log Could Explain
  • Analyzing the Recording: Replaying the Crash Back to the First Scene
  • Root Cause: A Use-After-Free in Nginx’s Connection Lifecycle
  • Frequently Asked Questions

Kong Plugin High CPU Usage: A Hidden Lua Exception Traced with Flame Graphs

  • The problem: Kong plugin high CPU usage under light traffic
  • Finding the CPU bottleneck with an OpenResty XRay flame graph
  • The result: Kong CPU usage cut from 80% to 50%
Photo by Yichun Zhang
  • The problem: Kong plugin high CPU usage under light traffic
  • Finding the CPU bottleneck with an OpenResty XRay flame graph
  • The result: Kong CPU usage cut from 80% to 50%

Real-Time Request Counting against Nginx Processes via YSQL

  • How to install the run-ysql tool
  • Count total requests served in real time
  • Filter out specific requests
  • Using YSQL in the Web Console
  • True non-invasive tracing
Photo by Yichun Zhang
  • How to install the run-ysql tool
  • Count total requests served in real time
  • Filter out specific requests
  • Using YSQL in the Web Console
  • True non-invasive tracing

Nginx Regex Performance: Find Slow Patterns with Dynamic Tracing

  • Prerequisites and Setup
  • Locate Slow Regex with CPU Flame Graphs
  • Performance After Regex Optimization
  • Limit PCRE Backtracking with lua_regex_match_limit
  • Non-Backtracking Engines: RE2 and OpenResty Regex
  • Lua Built-in Patterns as a Regex Alternative
  • Trace Regex Performance in Docker and Kubernetes
  • How the Dynamic-Tracing Tools Work
  • Tool Overhead: Zero Impact When Not Sampling
  • FAQ: Nginx Regex Performance
  • Prerequisites and Setup
  • Locate Slow Regex with CPU Flame Graphs
  • Performance After Regex Optimization
  • Limit PCRE Backtracking with lua_regex_match_limit
  • Non-Backtracking Engines: RE2 and OpenResty Regex
  • Lua Built-in Patterns as a Regex Alternative
  • Trace Regex Performance in Docker and Kubernetes
  • How the Dynamic-Tracing Tools Work
  • Tool Overhead: Zero Impact When Not Sampling
  • FAQ: Nginx Regex Performance

Listing Loaded Lua Modules in OpenResty or Nginx Processes

  • System Environment
  • Names of Loaded Lua Modules
  • Running Directly in the Web Console
  • Tracing Applications inside Containers
  • How The Tools are Implemented
  • The Overhead of the Tools
Photo by Yichun Zhang
  • System Environment
  • Names of Loaded Lua Modules
  • Running Directly in the Web Console
  • Tracing Applications inside Containers
  • How The Tools are Implemented
  • The Overhead of the Tools

Nginx High CPU Usage: Find Which Requests Consume the Most CPU

  • Prerequisites and Environment Setup
  • Find Which Request Hostname Uses the Most CPU
  • Find Which Request URI Uses the Most CPU
  • Digging Deeper: Why Some Hostnames Use More CPU
  • Running the Tools in the Web Console
  • Tracing Nginx CPU Usage Inside Containers
  • How the CPU Profiling Tools Work
  • The Overhead of the Profiling Tools
  • Frequently Asked Questions
Photo by Yichun Zhang
  • Prerequisites and Environment Setup
  • Find Which Request Hostname Uses the Most CPU
  • Find Which Request URI Uses the Most CPU
  • Digging Deeper: Why Some Hostnames Use More CPU
  • Running the Tools in the Web Console
  • Tracing Nginx CPU Usage Inside Containers
  • How the CPU Profiling Tools Work
  • The Overhead of the Profiling Tools
  • Frequently Asked Questions

Lua CPU Flame Graphs: Profiling LuaJIT in Production

  • What Is a Lua CPU Flame Graph
  • Profiling simple LuaJIT apps: verifying accuracy
  • Profiling complex LuaJIT apps in production
  • Sampling Overhead
  • Production safety: not a single bit changed
  • Compatibility
  • FAQ
Photo by Guido Jansen
  • What Is a Lua CPU Flame Graph
  • Profiling simple LuaJIT apps: verifying accuracy
  • Profiling complex LuaJIT apps in production
  • Sampling Overhead
  • Production safety: not a single bit changed
  • Compatibility
  • FAQ
Contact us

Love to hear from you, Get in touch πŸ‘‹

Message was sent successfully!

Our Team will get back to you within 24 hours.
x