OpenResty XRay
Aug 24, 2026
OpenResty XRay
Updated Aug 24, 2026
11 mins read
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