Learn OpenResty (NGINX + Lua) - API7.ai

3 min read Original article ↗
What Is the Difference Between OpenResty and NGINX?
Your First OpenResty Program: Hello World
Subprojects Behind OpenResty

OpenResty (NGINX + Lua)

September 12, 2022

Subprojects Behind OpenResty

This post introduces OpenResty's directory structure and related tools, such as NGINX C Modules, test-nginx, lua-resty projects, and more.

How to Manage Third-Party Packages of OpenResty Through LuaRocks and OPM?
Knowledge of NGINX Used in OpenResty

OpenResty (NGINX + Lua)

September 17, 2022

Knowledge of NGINX Used in OpenResty

Nginx provides the Master-Worker model and request execution phases. By reading this post, you can better grasp the basics of Nginx.

Getting Started With Lua

OpenResty (NGINX + Lua)

September 23, 2022

Getting Started With Lua

Lua is a lightweight and high-level programming language designed primarily for embedded use in applications. Getting started with Lua from here!

What Is the Difference Between LuaJIT And Standard Lua?
Why Does lua-resty-core Perform Better?

OpenResty (NGINX + Lua)

September 30, 2022

Why Does lua-resty-core Perform Better?

The lua-resty-core is a new FFI-based API for lua-nginx-module, which provides higher performance. Learn more from this post.

The JIT Compiler's Drawback: Why Avoid NYI?
What is table and metatable in Lua?

OpenResty (NGINX + Lua)

October 11, 2022

What is table and metatable in Lua?

Explore Lua's unique data structure, the table, and its metatable functionalities, guiding you through efficient usage and best practices.

Top Tips: Identifying Unique Concepts and Pitfalls in Lua
What if there is a conflict between Lua rules and NGINX configuration?
What makes OpenResty so special

OpenResty (NGINX + Lua)

October 14, 2022

What makes OpenResty so special

OpenResty is built with NGINX and LuaJIT, getting started from here to learn its basic concepts and how it works.

Documentation and Test Cases: Powerful Tools for Solving OpenResty Development Problems
OpenResty Is The Enhanced NGINX With Dynamic Requests and Responses

OpenResty (NGINX + Lua)

October 23, 2022

OpenResty Is The Enhanced NGINX With Dynamic Requests and Responses

OpenResty is the enhanced NGINX with dynamic requests and responses, and this article explains the APIs for manipulating Request and Response in OpenResty, such as "ngx.req.set_method", "ngx.req.set_uri_args", "ngx.req.set_header", etc.

Communication magic between NGINX workers: one of the most important data structures `shared dict`
The core of OpenResty: cosocket

OpenResty (NGINX + Lua)

October 28, 2022

The core of OpenResty: cosocket

The cosocket is the basis of various lua-resty-* non-blocking libraries. This article introduces the basic concepts and common APIs of cosocket.

Beyond the Web Server: Privileged Process and Timer Tasks
Introduction of Common APIs in OpenResty

OpenResty (NGINX + Lua)

November 4, 2022

Introduction of Common APIs in OpenResty

This article will introduce you to the use of OpenResty common APIs for time manipulation, regular expressions, and other common issues.

Handling Layer 4 of traffic and Implementing Memcached Server by OpenResty
OpenResty FAQ | Privileged Process Permission, Execution Phase, and more
Roadblock in Contributing Code: `test::nginx`
Testing Methods of `test::nginx`: Configuration, Sending Requests, and Handling Responses
Little-Known Usage of `test::nginx`
Accurate Performance Testing with `wrk`

OpenResty (NGINX + Lua)

November 25, 2022

Accurate Performance Testing with wrk

This article describes the features of the performance testing tool `wrk` and how to use it for efficient and accurate performance testing

OpenResty FAQ | Network Structure for Testing, SSL-related Features, DSL, `ab` Tool
Non-blocking I/O - The key to improving OpenResty performance
Advantages and Disadvantages of `string` in OpenResty

OpenResty (NGINX + Lua)

December 8, 2022

Advantages and Disadvantages of string in OpenResty

This article introduces the optimization techniques to be followed in OpenResty: processing requests short, simple, and fast and avoiding intermediate data generation. It also shows the optimization techniques for string

Tips for 10x Performance Improvement in OpenResty: `Table` Data Structure
OpenResty Coding Style Guide

OpenResty (NGINX + Lua)

December 15, 2022

OpenResty Coding Style Guide

OpenResty style guide contains general rules about "how to write" OpenResty, Lua, NGINX code

Various Debugging Methods in OpenResty

OpenResty (NGINX + Lua)

December 16, 2022

Various Debugging Methods in OpenResty

This article describes how to debug in OpenResty using breakpoints and print logs, Binary Search Algorithm and Comment, dynamic debugging, flame graph, etc.

Keys to High Performance: `shared dict` and `lru` Cache
`systemtap-toolkit` and `stapxx`: How to Use Data to Solve Difficult Problems?
How to Avoid Cache Stampede?

OpenResty (NGINX + Lua)

December 29, 2022

How to Avoid Cache Stampede?

We can use active update cache, lua-resty-lock, lua-resty-shcache, and NGINX directives to resolve cache stampedes in NGINX, OpenResty.

`lua-resty-*` Encapsulation Releases Developers from Multi-Level Caching
How to Deal with Bursty Traffic: Leaky Bucket and Token Bucket Algorithms
Dynamic Rate-Limiting in OpenResty

OpenResty (NGINX + Lua)

January 6, 2023

Dynamic Rate-Limiting in OpenResty

Let's learn how to use the implementation of `limit-req`, `limit-count`, `limit-conn`, and `limit.traffic` in `lua-resty-limit-traffic` and conduct rate limiting with them.

OpenResty's Killer Feature: Dynamic

OpenResty (NGINX + Lua)

January 12, 2023

OpenResty's Killer Feature: Dynamic

Openresty enables FaaS, Edge Computing, Dynamic Upstream, and more with the dynamic features provided by LuaJIT

Three Commonly-Used Lua Resty Libraries in OpenResty
OpenResty FAQ | Dynamic Load, NYI, and Caching of Shared Dict
Part 1: How to Build a Microservices API gateway using OpenResty
Part 2: How to Build a Microservices API gateway using OpenResty
Part 3: How to Build a Microservices API Gateway Using OpenResty
OpenResty FAQ | How OpenResty Is Used in Practice