Featured Articles

Photo by Yichun Zhang

How a Single "0" Took Down Bilibili — Every Server at 100% CPU, and Reboots Didn't Help

How a Single "0" Took Down Bilibili — Every Server at 100% CPU, and Reboots Didn't Help

Binary Vulnerability Scanning: Catch Backported Patches, Cut False Positives

Binary Vulnerability Scanning: Catch Backported Patches, Cut False Positives

Binary Vulnerability Scanning: Catch Backported Patches, Cut False Positives

Introduction to OpenResty XRay

Introduction to OpenResty XRay

Introduction to OpenResty XRay

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

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

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

Non-Invasive Java Profiler: Capture Method Arguments in Production Without a Java Agent

Non-Invasive Java Profiler: Capture Method Arguments in Production Without a Java Agent

Non-Invasive Java Profiler: Capture Method Arguments in Production Without a Java Agent

Photo by Philip Brown

The Wonderland of Dynamic Tracing (Part 1 of 3)

The Wonderland of Dynamic Tracing (Part 1 of 3)

Photo by Jose G. Ortega Castro

How OpenResty and Nginx Shared Memory Zones Consume RAM

How OpenResty and Nginx Shared Memory Zones Consume RAM

Photo by Harrison Broadbent

Nginx Memory Usage Explained: Where the RAM Actually Goes

Nginx Memory Usage Explained: Where the RAM Actually Goes

OpenResty XRay reduce your CPU usage up to  90%
OpenResty XRay reduce your CPU usage up to 90%
Request free trial

Latest Articles

LuaJIT in OpenResty: How It Works and How luajit2 Differs

  • Which Lua runtime OpenResty uses
  • How Lua code runs inside Nginx workers
  • How LuaJIT interprets and compiles code
  • How luajit2 differs from upstream LuaJIT
  • How LuaJIT-plus relates to the standard runtime
  • LuaJIT vs luajit2: frequently asked questions
  • Where to continue reading by problem
  • Which Lua runtime OpenResty uses
  • How Lua code runs inside Nginx workers
  • How LuaJIT interprets and compiles code
  • How luajit2 differs from upstream LuaJIT
  • How LuaJIT-plus relates to the standard runtime
  • LuaJIT vs luajit2: frequently asked questions
  • Where to continue reading by problem

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

Multi-Provider DNS Redundancy: Stay Online When a DNS Provider Fails, Geo-Routing Intact

  • Why multi-provider DNS often means giving up intelligent routing
  • How OpenResty Edge adds DNS redundancy: primary for intelligent routing, secondary providers as fallback
  • Which zones suit this multi-provider DNS setup
  • Frequently asked questions
  • Why multi-provider DNS often means giving up intelligent routing
  • How OpenResty Edge adds DNS redundancy: primary for intelligent routing, secondary providers as fallback
  • Which zones suit this multi-provider DNS setup
  • Frequently asked questions

From AI Flame Graph Analysis to Verified Fixes: A Coding-Agent Optimization Loop with OpenResty XRay

  • Prerequisite: OpenResty XRay must already be installed on the target machine
  • Your coding agent isn’t short on intelligence—it’s short on runtime visibility
  • Three optimization rounds: 336 → 4,457 → 26,028 → 29,968 RPS
  • Lua + C, two perspectives: why you shouldn’t try to optimize writev
  • FAQ
  • Prerequisite: OpenResty XRay must already be installed on the target machine
  • Your coding agent isn’t short on intelligence—it’s short on runtime visibility
  • Three optimization rounds: 336 → 4,457 → 26,028 → 29,968 RPS
  • Lua + C, two perspectives: why you shouldn’t try to optimize writev
  • FAQ

Flame Graphs: How to Read a CPU Flame Graph and Find the Code Burning Your CPU

  • What is a flame graph: definition, axes, and the four rules
  • How to read a flame graph: plateaus, towers, hair, and self vs total
  • Three real production flame graphs: PHP preg_match, Go regexp.MustCompile, Erlang erts_pcre_exec
  • From 100% CPU to the culprit line: a four-step workflow with a per-stack routing table
  • How to get a flame graph for your stack
  • Icicle graphs, flame charts, and other variants
  • Can AI read flame graphs for you?
  • What is a flame graph: definition, axes, and the four rules
  • How to read a flame graph: plateaus, towers, hair, and self vs total
  • Three real production flame graphs: PHP preg_match, Go regexp.MustCompile, Erlang erts_pcre_exec
  • From 100% CPU to the culprit line: a four-step workflow with a per-stack routing table
  • How to get a flame graph for your stack
  • Icicle graphs, flame charts, and other variants
  • Can AI read flame graphs for you?

P99 Latency: Why Averages Lie, and How to Diagnose the Slowest 1%

  • What is P99 latency?
  • P50 vs P95 vs P99: what each percentile tells you
  • Why average latency lies
  • Why is P99 latency high? A root-cause spectrum
  • How to diagnose high P99 latency
  • How to reduce P99 latency: fix what you found
  • Summary
  • Frequently Asked Questions
  • What is P99 latency?
  • P50 vs P95 vs P99: what each percentile tells you
  • Why average latency lies
  • Why is P99 latency high? A root-cause spectrum
  • How to diagnose high P99 latency
  • How to reduce P99 latency: fix what you found
  • Summary
  • Frequently Asked Questions

Memory Leak Detection in Production: From RSS Curve to Source Line

  • The Symptom: A Memory Curve That Only Goes Up
  • Memory Leak or Just High Memory Usage?
  • Four Leak Patterns with Real Root-Cause Chains
  • It Looks Like a Leak, but It Isn’t
  • How to Locate a Leak: Top-Down Layered Attribution
  • Why Traditional Tools Fall Short in Production
  • Frequently Asked Questions
  • The Symptom: A Memory Curve That Only Goes Up
  • Memory Leak or Just High Memory Usage?
  • Four Leak Patterns with Real Root-Cause Chains
  • It Looks Like a Leak, but It Isn’t
  • How to Locate a Leak: Top-Down Layered Attribution
  • Why Traditional Tools Fall Short in Production
  • Frequently Asked Questions

Off-CPU Analysis: Four Root Causes Behind Low CPU Yet High Latency

  • What Is Off-CPU Time?
  • The Symptom: CPU Usage Won’t Climb, Yet Requests Are Queuing
  • Four Categories of Off-CPU Root Causes with Real-World Root-Cause Chains
  • How to Quantify Off-CPU Time
  • On-CPU + Off-CPU = Wall-Clock Time: The Bigger Picture and the Tool Ecosystem
  • FAQ
  • What Is Off-CPU Time?
  • The Symptom: CPU Usage Won’t Climb, Yet Requests Are Queuing
  • Four Categories of Off-CPU Root Causes with Real-World Root-Cause Chains
  • How to Quantify Off-CPU Time
  • On-CPU + Off-CPU = Wall-Clock Time: The Bigger Picture and the Tool Ecosystem
  • FAQ

CDN for Live Streaming: Surviving Peak Events Without Peak-Event Bills

  • Why live streams crash at peak: running day-to-day doesn’t mean surviving the peak
  • How a private CDN turns peak stability from probability into certainty
  • Live streaming CDN cost comparison: surviving the peak isn’t paying for the peak
  • The real cost of a private CDN: not the same as building from scratch
  • Beyond delivery: what a live streaming scenario needs from the same gateway layer
  • FAQ
  • Why live streams crash at peak: running day-to-day doesn’t mean surviving the peak
  • How a private CDN turns peak stability from probability into certainty
  • Live streaming CDN cost comparison: surviving the peak isn’t paying for the peak
  • The real cost of a private CDN: not the same as building from scratch
  • Beyond delivery: what a live streaming scenario needs from the same gateway layer
  • FAQ

Building a Self-Hosted Live Streaming CDN for HLS with OpenResty Edge

  • Why live HLS breaks a naive caching setup
  • Building it on OpenResty Edge: two page rules with opposite TTLs
  • The most critical step: the Use stale proxy cache action
  • A shield tier with gateway partitions: collapsing to one fetch network-wide
  • Verifying the configuration and load testing
  • FAQ
  • Why live HLS breaks a naive caching setup
  • Building it on OpenResty Edge: two page rules with opposite TTLs
  • The most critical step: the Use stale proxy cache action
  • A shield tier with gateway partitions: collapsing to one fetch network-wide
  • Verifying the configuration and load testing
  • 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
Contact us

OpenResty open-source community workspace

Please join us here and share your thoughts and questions with us, we can't wait to see you there!


limited time offer

Request TRIAL today and receive a diagnostic REPORT
Learn more

Love to hear from you, Get in touch 👋

Message was sent successfully!

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