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

  • When You Can’t Touch the Build Pipeline
  • Why a Regex Won’t Cut It
  • Three Approaches That Almost Work
  • A Streaming FSM for Each Language, Compiled to Native Code
  • Five-Minute Setup: A Configuration Example
  • Four Things to Know Before Going Live
  • When You Can’t Touch the Build Pipeline
  • Why a Regex Won’t Cut It
  • Three Approaches That Almost Work
  • A Streaming FSM for Each Language, Compiled to Native Code
  • Five-Minute Setup: A Configuration Example
  • Four Things to Know Before Going Live

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 in Nginx Clusters: Zero-Downtime Key Rotation

  • Why Session Ticket Key Management Is Harder Than It Looks
  • How lua-resty-tls-session Rotates Session Ticket Keys Without Restarts
  • Comparing the Three Approaches
  • Quantifying Latency Reduction and Uptime Gains
  • FAQ
  • Why Session Ticket Key Management Is Harder Than It Looks
  • How lua-resty-tls-session Rotates Session Ticket Keys Without Restarts
  • Comparing the Three Approaches
  • Quantifying Latency Reduction and Uptime Gains
  • FAQ

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