Fact-checked by Grok 2 weeks ago

OpenResty

OpenResty is a dynamic web platform that bundles an enhanced version of the Nginx core with LuaJIT, a just-in-time compiler for the Lua programming language, along with numerous Lua libraries, high-quality third-party Nginx modules, and their external dependencies. This integration transforms the Nginx web server into a powerful application server capable of handling scalable web applications, dynamic gateways, and high-concurrency services through Lua scripting. Created in 2007 by Yichun Zhang (known as agentzh), OpenResty originated as an open-source project and has evolved into a widely adopted solution, powering over 85 million live websites and nearly 40 million active domains, ranking as the fourth most used web server globally with a 14.31% domain market share (as of August 2025). Unlike a traditional fork of , OpenResty incorporates the official codebase while applying custom patches—many of which are upstreamed to the project—and continuously integrates the latest features and bug fixes from both and . Key components include the standard core for event-driven I/O, an enhanced for efficient scripting, and modules such as those for non-blocking interactions with databases like and , enabling applications to process 10,000 to over 1,000,000 connections per server. It supports a range of use cases, from dynamic web portals and gateways to web application firewalls, and is deployed across large-scale environments like those at companies including Alibaba and , where it serves billions of requests daily on minimal hardware. OpenResty is licensed under the 2-clause BSD license and maintained through an active open-source community on , with over 13,000 stars and contributions from hundreds of developers. Commercial support and enterprise tools, such as OpenResty Edge for and OpenResty XRay for profiling, are provided by OpenResty Inc., founded by Zhang to address production-scale web challenges. The platform's design emphasizes and extensibility, allowing developers to embed custom code directly into configurations for tasks like request routing, caching, and security without sacrificing speed.

Overview

Definition and Purpose

OpenResty is a full-fledged that integrates an enhanced version of the core with , carefully selected Lua libraries, and numerous third-party modules, along with their external dependencies. Unlike a of , OpenResty assembles these components into a cohesive bundle, with patches contributed back to the upstream project to ensure compatibility and upstream integration. The primary purpose of OpenResty is to enable developers to construct scalable web applications, robust web services, and dynamic web gateways capable of handling high-concurrency workloads, such as backends and real-time data processing systems. By embedding scripting directly into the event-driven architecture, it supports non-blocking I/O operations for efficient resource utilization in demanding environments. Created by Yichun "agentzh" Zhang, OpenResty is written primarily in C, with the bundle licensed under a 2-clause BSD . The latest stable release, version 1.27.1.2, was made available on April 3, 2025.

Key Components

OpenResty is built upon several core components that integrate seamlessly to enable dynamic development. At its foundation is an enhanced version of the standard core, which provides the scalable event-driven architecture while incorporating patches for integration, allowing Lua scripts to interact directly with 's processing pipeline. This core is extended by , a just-in-time for Lua 5.1, which delivers high-performance execution of Lua code within the Nginx environment, ensuring efficient handling of complex scripting tasks without compromising the server's responsiveness. Complementing these are select Lua libraries, such as lua-resty-core, a pure Lua library that reimplements parts of the Lua module's using LuaJIT's (FFI) for optimized access to Nginx features, promoting interoperability between Lua scripts and core server operations. Among the bundled Nginx modules, the lua-nginx-module stands out as the primary enabler, embedding the interpreter into to allow scripting at various request phases, thereby facilitating dynamic content generation and real-time decision-making across components. Additional modules like ngx_srcache provide caching capabilities that leverage shared resources for faster response times, while ngx_drizzle and ngx_postgres offer database connectivity to MySQL-compatible and backends, respectively, allowing Lua scripts to query databases non-blockingly and integrate data flows directly into the web serving process. These modules interoperate through Lua's extensible nature, enabling developers to chain operations such as caching database results or injecting dynamic logic into static Nginx configurations. Most components in OpenResty are enabled by default upon installation, providing a ready-to-use , though users can disable or customize them during compilation using specific configure flags, such as --without-http_lua_module to exclude support. For optional modules like ngx_drizzle and ngx_postgres, explicit enablement is required via flags like --with-http_drizzle_module. This configurability ensures flexibility while maintaining the bundled ecosystem's cohesion. A key interoperability feature is the support for zones, which allow data sharing across all worker processes in a instance, using directives like lua_shared_dict to allocate zones for storing tables or other structures, thus enabling efficient inter-worker communication for tasks like session management or global state maintenance without external dependencies.

History

Origins

OpenResty originated in October 2007 at , where Yichun Zhang (agentzh) developed it as a Perl-based RESTful designed to handle dynamic requests for an platform. This initial version, distributed via , provided a general-purpose platform supporting features like database interfaces, caching, and generation to facilitate RESTful services in web applications. The framework addressed the need for flexible, dynamic handling of API requests in production environments, overcoming the constraints of purely static web server setups. In September 2009, following Zhang's move to (part of ), the project was redeveloped as ngx_openresty to better suit high-traffic demands. This iteration shifted from to an core integrated with , enabling superior performance for processing massive dynamic workloads, such as those supporting millions of daily user interactions on 's platform. The embedding was selected for its capabilities, which enhanced scripting speed in serving. Early development and sponsorship came from Yahoo! China and until , during which ngx_openresty evolved as an internal tool for scalable web services. In June 2011, it transitioned to a fully open-source project under the name OpenResty, broadening its availability beyond use and emphasizing its role in extending for dynamic, production-grade deployments. The core motivation remained solving the rigidity of static configurations, allowing inline scripting to manage complex, high-concurrency scenarios without external dependencies.

Development Milestones

In 2011, the project was renamed OpenResty from its prior moniker ngx_openresty and fully open-sourced, coinciding with the establishment of its primary GitHub repository to facilitate broader collaboration. This transition marked a pivotal shift toward independent development following earlier sponsorship by Yahoo! China and Taobao.com, with subsequent support from Cloudflare Inc. from 2012 to 2016. By 2014, OpenResty's popularity surged, with annual downloads exceeding 550,000, reflecting its growing adoption among developers. That year also saw the introduction of community-driven modules, expanding the platform's extensibility through user-contributed extensions. In late 2015, the inaugural OpenResty Con conference was held in , , fostering direct engagement among users, contributors, and creators to discuss advancements and applications. The year 2017 brought organizational maturation with the formation of OpenResty Inc., providing commercial support and enterprise solutions while sustaining the open-source project. This entity, founded by Yichun Zhang, enabled dedicated resources for maintenance and innovation. In 2020, OpenResty released its 10-year community report, underscoring significant ecosystem growth, including over 5,000 pull requests across 69 repositories and widespread integration in production environments. Major releases progressed steadily from the 1.7.x series in , which introduced enhanced bundling, to the 1.27.x series by 2025, incorporating upstream integrations and security patches. For instance, version 1.27.1.2, released on March 14, 2025, addressed vulnerabilities and upgraded core components like and . Ongoing maintenance is led by Yichun Zhang, with contributions from a global community via , ensuring regular updates for compatibility and performance.

Architecture

Core Integration

OpenResty centers its architecture around an enhanced version of the core, which serves as the event-driven foundation for handling HTTP requests and responses. Nginx employs a master-worker process model, where the master process manages worker processes responsible for processing client connections, ensuring efficient resource utilization and scalability without inter-worker locking. OpenResty extends this model by introducing a privileged agent process that operates with master-level permissions to perform high-privilege tasks, such as binary hot upgrades, thereby enhancing deployment flexibility. Lua scripts integrate seamlessly into the Nginx pipeline through configuration directives specified in nginx.conf, allowing developers to inject custom logic at precise points in the request lifecycle. Key directives, such as content_by_lua_block, rewrite_by_lua_block, and access_by_lua_block, enable Lua code execution during specific phases, including rewrite (for manipulation), access (for and ), and content (for generating response bodies). These integration points allow Lua code to interact directly with Nginx's internal structures, transforming static configurations into dynamic behaviors while maintaining the server's core efficiency. The non-blocking I/O model in OpenResty builds upon Nginx's asynchronous , utilizing system-level mechanisms like on or on BSD systems to manage connections without thread-blocking operations. This enables efficient handling of concurrent requests and asynchronous interactions with upstream services, such as databases or caches, through Lua coroutines that yield control back to the event loop during I/O waits. Lua scripts executed via the embedded interpreter further support this model by providing non-blocking APIs for subrequests and sockets, ensuring the runtime environment remains responsive under high load. Memory management in OpenResty facilitates data sharing across worker processes via zone-based shared dictionaries, declared using the lua_shared_dict directive in the HTTP context of nginx.conf. These dictionaries allocate fixed-size shared memory zones (e.g., lua_shared_dict dogs 10m) that persist data like caches or session states accessible from any worker, avoiding the need for external storage while minimizing synchronization overhead. Access occurs through the ngx.shared API in Lua, enabling atomic operations for thread-safe updates in a multi-worker setup. During compilation from source, OpenResty bundles its core components—including , , and various modules—using the ./configure script with options like --with-luajit (enabled by default), --add-module=PATH for third-party modules, and --with-pcre-jit for performance optimizations. The process involves extracting the source tarball, running ./configure [options], followed by make and make install, resulting in a cohesive that integrates all elements without requiring separate installations.

LuaJIT Embedding

LuaJIT serves as the primary Lua interpreter embedded within OpenResty, functioning as a just-in-time (JIT) compiler for 5.1 that delivers performance approaching native code through advanced optimizations like trace compilation and a high-speed assembler. This enhancement enables efficient execution of Lua scripts in high-throughput server environments, maintaining full API and ABI compatibility with standard Lua 5.1 while supporting multiple architectures including x86, , and . The embedding of LuaJIT into Nginx occurs primarily through the lua-nginx-module, a core component of OpenResty that integrates the interpreter directly into the Nginx core. This module allows Lua code to execute across various Nginx processing phases, such as initialization (init_by_lua_block), rewriting (rewrite_by_lua_block), access control (access_by_lua_block), content generation (content_by_lua_block), header filtering (header_filter_by_lua_block), body filtering (body_filter_by_lua_block), and logging (log_by_lua_block). By leveraging Lua coroutines as lightweight threads, the module synchronizes Lua execution with Nginx's event-driven model, enabling non-blocking operations like cosockets for network I/O without disrupting the server's asynchronous architecture. Lua scripts can be loaded either inline within Nginx configuration files using block directives like content_by_lua_block { ... }, which embed the code directly, or from external files via file-based directives such as content_by_lua_file /path/to/script.lua. The lua_package_path directive further extends this by specifying directories for loading Lua modules, mimicking Lua's standard module search path and allowing reusable code organization across the server's Lua environment. These mechanisms ensure flexibility in deployment, with external loading particularly useful for maintaining large scripts outside configuration files. A key feature of this embedding is LuaJIT's Foreign Function Interface (FFI), which permits Lua scripts to directly invoke C functions and access C data structures without wrappers or extensions. In the context of OpenResty, the FFI enables seamless integration with Nginx's C APIs and third-party libraries, such as performing low-level socket operations or cryptographic computations, thereby extending Lua's capabilities for performance-critical tasks while avoiding the overhead of traditional Lua C modules. To suit server environments with long-running processes, OpenResty's LuaJIT integration includes tuning options for garbage collection to reduce memory pauses and fragmentation. The lua_malloc_trim directive, for instance, automatically releases cached memory back to the operating system every specified number of requests (default: 1000), preventing gradual memory bloat in worker processes. Additionally, the lua_thread_cache_max_entries directive manages a of Lua thread objects per worker (default: 1024), recycling coroutines to minimize allocation overhead and GC pressure during frequent request handling. These configurations help maintain stable performance under load by aligning Lua's with Nginx's pooled allocation strategy.

Features

Dynamic Scripting

OpenResty enables dynamic scripting through the integration of code into configurations, allowing developers to inject custom logic directly into various processing phases of HTTP requests. This capability is provided by the ngx_lua module, which embeds and exposes 's internal APIs to scripts for non-blocking operations. scripts are embedded using specific directives in the nginx.conf file, such as access_by_lua, which executes code during the access phase to implement or checks, like verifying user credentials before allowing request processing. Similarly, content_by_lua runs in the content phase to generate dynamic responses, such as assembling data from backend services on the fly. These directives support both inline blocks and file-based inclusion for modular script management. To handle common tasks like and retrieval, OpenResty leverages libraries such as lua-resty-redis, a non-blocking client that facilitates caching operations by connecting to servers via cosockets and supporting commands like SET and GET for storing session data or responses. For database interactions, lua-resty-mysql provides a non-blocking driver, enabling scripts to perform queries, such as selecting user records, while maintaining Nginx's event-driven model without blocking worker processes. Dynamic module loading in OpenResty scripts is achieved using Lua's require() function within ngx_lua contexts, allowing libraries to be loaded on-demand during request processing; for instance, a script can require a utility module only when conditional logic dictates its use, optimizing memory footprint. Error handling in these scripts employs Lua's pcall() to catch runtime exceptions safely, preventing crashes and enabling custom recovery logic that integrates with Nginx's error_page directives to serve fallback responses, such as redirecting to an error handler on database connection failures. For security, OpenResty sandboxes execution in independent global environments per request, isolating scripts to mitigate risks from untrusted code and limiting access to sensitive system resources unless explicitly granted via APIs.

Performance Enhancements

OpenResty achieves high-throughput and low- performance by integrating scripting into Nginx's core event-driven model, which enables asynchronous handling of thousands to over a million concurrent connections per server through non-blocking I/O operations. This processes events efficiently without blocking on individual requests, allowing workers to manage extensive workloads while maintaining responsiveness. By embedding Lua coroutines via cosockets and subrequests, OpenResty ensures that script execution aligns seamlessly with Nginx's asynchronous paradigm, minimizing in dynamic applications. A key optimization is the srcache-nginx-module, which implements transparent caching for responses from upstream servers or static files, thereby reducing redundant backend invocations and accelerating content delivery. This module stores cached data in backends like via the memc-nginx-module, supporting configurable cache keys, TTLs, and eviction policies to balance memory usage and hit rates. In practice, srcache can cut upstream traffic by caching frequently requested resources, leading to substantial reductions in response times for read-heavy workloads. Connection pooling further enhances efficiency in upstream interactions, particularly through libraries like lua-resty-http, which reuse connections across requests to avoid the overhead of repeated handshakes. This cosocket-based client generates pool names based on host, port, and SSL settings, enabling persistent connections that improve throughput for HTTP proxying or calls. Combined with shared memory mechanisms, such as the lua_shared_dict directive, OpenResty facilitates lock-free across workers, reducing synchronization costs and boosting CPU utilization for . LuaJIT's just-in-time compilation, customized in OpenResty's branch with aggressive optimization flags like maxtrace=8000, delivers near-native execution speeds for Lua scripts, outperforming standard Lua interpreters by orders of magnitude in compute-intensive tasks. For monitoring these enhancements, OpenResty provides profiling via tools like OpenResty , which analyzes bottlenecks in , alongside community libraries for metrics collection to inform ongoing optimizations.

Usage

Configuration Fundamentals

OpenResty utilizes a configuration system inherited from NGINX, with the primary configuration file named nginx.conf. This file organizes directives into hierarchical blocks such as http, server, and location, allowing administrators to define global settings, virtual servers, and specific URI handling rules. For instance, the http block encompasses server-wide configurations, while server blocks specify listening ports and hostnames, and location blocks match request URIs to apply targeted directives. Installation of OpenResty can be achieved through pre-built packages for various distributions, such as using apt on or and yum or dnf on , RHEL, or , which simplifies deployment without source compilation. Alternatively, users can download and compile from source, where the module is bundled by default in official OpenResty releases, eliminating the need for separate --with-http_lua_module flags during builds. Once installed, OpenResty is started via the openresty command-line tool, which functions similarly to 's nginx binary, typically by specifying the path, such as openresty -c /path/to/nginx.conf. To enable Lua scripting within the configuration, directives like content_by_lua_block are placed inside location blocks to embed inline Lua code for dynamic content generation or processing. The lua_code_cache on; directive, enabled by default, optimizes performance by caching compiled Lua bytecode, though it can be set to off during development for immediate code changes. Lua blocks, such as those using content_by_lua_block, integrate seamlessly into the NGINX processing phases without requiring additional module loading in standard OpenResty installations. Logging in OpenResty combines 's built-in facilities with Lua-specific for comprehensive error tracking and . The error_log directive in nginx.conf specifies the log file path and verbosity level, such as error_log logs/error.log warn;, directing errors to a designated file. Within Lua scripts, the ngx.log function allows custom logging at various levels (e.g., ngx.log(ngx.ERR, "An error occurred");), which outputs to the same error log configured via the error_log directive. Configuration changes in OpenResty support graceful reloading to apply updates without interrupting active connections or causing downtime. This is accomplished using the command openresty -s reload (or equivalently nginx -s reload), which validates the new nginx.conf and spawns worker processes to adopt it seamlessly.

Application Examples

OpenResty enables the development of dynamic web applications by embedding scripting directly into configurations, allowing for efficient handling of HTTP requests and responses. One basic application is a simple HTTP responder that generates custom content, such as data, without relying on external backends. For instance, the following configuration uses the content_by_lua_block directive to return a object:
http {
    server {
        listen 8080;
        location /api/hello {
            content_by_lua_block {
                local cjson = require "cjson"
                ngx.header.content_type = "application/json"
                ngx.say(cjson.encode({message = "[Hello, World](/page/Hello_World)!", status = "success"}))
            }
        }
    }
}
This setup leverages the built-in lua-cjson library to encode tables into format, ensuring a lightweight response for endpoints. Database integration is another common use case, where OpenResty queries external databases during the request processing phases to enforce security or retrieve data. The lua-resty-mysql library provides a non-blocking interface for MySQL interactions, suitable for authentication in the access phase. For example, the configuration below checks user credentials against a MySQL database before allowing access:
http {
    lua_shared_dict auth_cache 1m;
    server {
        listen 8080;
        location /protected {
            access_by_lua_block {
                local mysql = require "resty.mysql"
                local db, err = mysql:new()
                if not db then
                    ngx.log(ngx.ERR, "failed to instantiate mysql: ", err)
                    return ngx.exit(500)
                end
                db:set_timeout(1000) -- 1 sec
                local ok, err = db:connect{
                    host = "127.0.0.1",
                    port = 3306,
                    database = "auth_db",
                    user = "user",
                    password = "pass"
                }
                if not ok then
                    ngx.log(ngx.ERR, "failed to connect: ", err)
                    return ngx.exit(500)
                end
                local username = ngx.var.arg_user
                local password = ngx.var.arg_pass
                local quoted_username = ngx.quote_sql_str(username)
                local quoted_password = ngx.quote_sql_str(password)
                local res, err = db:query("SELECT id FROM users WHERE username = " .. quoted_username .. " AND password = " .. quoted_password, 100)
                if not res then
                    ngx.log(ngx.ERR, "bad result: ", err)
                    return ngx.exit(403)
                elseif #res > 0 then
                    -- Auth successful
                else
                    return ngx.exit(401)
                end
                db:close()
            }
            # Proxy to upstream if auth passes
            proxy_pass http://backend;
        }
    }
}
This example establishes a , executes a query for validation, and denies if no matching user is found, all without blocking the event loop. OpenResty also supports caching mechanisms to optimize for both static and dynamic by integrating with upstream services. The srcache-nginx-module enables transparent subrequest-based caching, often combined with for distributed storage. A practical caching might look like this:
http {
    upstream my_memcached {
        server 127.0.0.1:11211;
    }
    [server](/page/Server) {
        listen 8080;
        [location](/page/Location) /cached {
            srcache_fetch GET /memc $uri?$args;
            srcache_methods GET HEAD;
            srcache_store PUT /memc $uri?$args;
            srcache_expires [300](/page/300);
            add_header X-Srcache-Fetch-Status $srcache_fetch_status;
            [location](/page/Location) /memc {
                internal;
                set_md5 $srcache_key $uri?$args;
                memc_cmds_allowed GET SET;
                memc_pass my_memcached;
                memc_timeout 100ms;
            }
            # Fall back to upstream for cache misses
            proxy_pass http://dynamic_upstream;
        }
    }
}
Here, requests are first checked against the ; if missed, the upstream is invoked, and the response is stored for subsequent requests within the 300-second expiration window. In API gateway scenarios, OpenResty implements to protect backends from abuse using the lua-resty-limit-traffic library. This module controls request rates based on keys like client , rejecting or delaying excess traffic. An example for limiting to 200 requests per second with a burst of 100 is:
http {
    lua_shared_dict my_limit_req_store 100m;
    server {
        listen 8080;
        location /api {
            access_by_lua_block {
                local limit_req = require "resty.limit.req"
                local lim, err = limit_req.new("my_limit_req_store", 200, 100)
                if not lim then
                    ngx.log(ngx.ERR, "failed to instantiate limit req object: ", err)
                    return ngx.exit(500)
                end
                local key = ngx.var.binary_remote_addr
                local delay, err = lim:incoming(key, true)
                if not delay then
                    if err == "rejected" then
                        return ngx.exit(503)
                    end
                    ngx.log(ngx.ERR, "failed to limit req: ", err)
                    return ngx.exit(500)
                end
                if delay >= 0.001 then
                    ngx.sleep(delay)
                end
            }
            proxy_pass http://api_backend;
        }
    }
}
This enforces the limit during the access phase, allowing bursts while throttling sustained high traffic to maintain system stability. In production environments, OpenResty powers firewalls (WAFs) by embedding custom Lua logic for threat detection and mitigation at the edge. For example, utilized OpenResty-based Lua scripting in its WAF to compile and execute rules efficiently for global traffic protection. It also serves as a backend for mobile applications, handling high-concurrency web services and dynamic gateways that support millions of users, as seen in platforms requiring scalable orchestration.

Ecosystem

Community Contributions

The OpenResty plays a vital role in extending the platform's capabilities through open-source contributions, including modules, documentation, and tools that enhance its ecosystem. Community members develop and maintain packages that integrate seamlessly with OpenResty, fostering innovation in areas like SSL certificate and optimization. This collaborative effort has grown the platform's , with contributions managed through structured channels that encourage participation from developers worldwide. A key aspect of community involvement is the OpenResty Package Manager (OPM), which serves as the official repository for community-contributed Lua modules and libraries. OPM functions similarly to package managers like or , allowing users to install and manage third-party packages via a command-line utility. For instance, the lua-resty-auto-ssl module, which automates SSL certificate issuance and renewal within OpenResty, is distributed through OPM and has been downloaded extensively for enabling secure configurations on the fly. Contributions occur primarily through GitHub repositories, where developers submit pull requests and report issues for core components like the lua-nginx-module. The OpenResty organization maintains over 60 active repositories, with more than 1,100 pull requests across the top 10 alone, reflecting robust community engagement in code reviews and enhancements. Additionally, mailing lists facilitate discussions: the English list at [email protected] handles technical queries and announcements, while the Chinese list at [email protected] supports a large portion of the global user base. Community events and educational resources further strengthen participation. OpenResty Con, the project's conference, was first held in late 2015 in Beijing and followed by an edition in 2016 in Shenzhen, where developers shared advancements in Lua integration and Nginx extensions. Video tutorials, available on the official OpenResty YouTube channel, cover topics from basic setup to advanced debugging, aiding newcomers and experienced users alike. Online forums, such as Stack Overflow's openresty tag, which has 465 questions and answers, provide ongoing support for troubleshooting and best practices. OpenResty powers nearly 40 million active domains and over 85 million websites globally, representing about 6.89% of all sites as of mid-2025, underscoring the community's impact on scalable web infrastructure. The project's loose organization emphasizes self-contained, independent of components, allowing contributors to focus on modular improvements without centralized oversight. This approach has sustained a vibrant , with guidelines encouraging high-quality, compatible submissions to repositories and OPM. OpenResty Edge is a distributed traffic management platform developed by OpenResty Inc., designed for setting up dynamic load balancers and clusters to handle high-traffic applications. Released in 2023, it extends the core OpenResty capabilities with features like global server load balancing (GSLB) and automated , enabling users to build private content delivery networks (CDNs) and solutions without relying on proprietary hardware. This platform supports deployment across various Linux distributions, including , , and , and integrates scripting for custom traffic routing logic. OpenResty XRay serves as a dynamic tracing and for performance profiling, memory analysis, and real-time troubleshooting in OpenResty-based applications. It employs noninvasive techniques to capture application traces, identify bottlenecks, and optimize resource usage, such as detecting memory leaks or slow code execution paths. Available in on-premises and cloud editions, XRay includes standard analyzers for stacks and supports integration with OpenResty's environment to provide insights without code modifications. The lua-resty-* family of libraries comprises official and endorsed Lua modules bundled with or distributed via OpenResty's package manager (OPM), enhancing functionality in areas like core API access and security. For instance, lua-resty-core provides FFI-based interfaces to NGINX internals for efficient SSL session management and variable manipulation. Similarly, lua-resty-openidc implements OpenID Connect relying party and OAuth 2.0 resource server protocols, enabling secure authentication flows in OpenResty deployments. Among derivative projects, Apache APISIX stands out as a Kubernetes-native gateway built directly on OpenResty, leveraging its core and for high-performance traffic management. APISIX extends OpenResty with , plugin-based extensibility, and integration, making it suitable for architectures while inheriting OpenResty's scalability for handling billions of requests daily. Commercial support for OpenResty and its extensions is provided through OpenResty Inc., offering enterprise-grade services for deployment, optimization, and maintenance in production environments. This includes tailored solutions for troubleshooting via , scaling with , and integrating lua-resty libraries, serving global customers who process massive traffic volumes.

References

  1. [1]
    OpenResty® - Open source
    OpenResty is a full-fledged web platform that integrates our enhanced version of the Nginx core, our enhanced version of LuaJIT, many carefully written Lua ...DownloadGetting StartedOpenResty 1.27.1.2 ReleasedVideo TutorialsOpenResty 1.27.1.1 Released
  2. [2]
    High Performance Web Platform Based on Nginx and LuaJIT - GitHub
    OpenResty is a full-fledged web application server by bundling the standard nginx core, lots of 3rd-party nginx modules, as well as most of their external ...<|control11|><|separator|>
  3. [3]
    OpenResty - Enterprise solutions
    We create value by solving your complicated web issues with our cutting-edge software solutions and enterprise support for better quality, reliability, and ...
  4. [4]
    OpenResty - Components
    ### Summary of OpenResty Components
  5. [5]
    OpenResty® - Open source
    ### Summary of OpenResty
  6. [6]
    About - OpenResty
    Jun 21, 2011 · OpenResty 1.27.1.2 Released · OpenResty® Linux Packages. 31 Mar 2025. Download · ChangeLog for 1.27.1.x. 17 Oct 2024. OpenResty 1.27.1.1 ...
  7. [7]
    OpenResty 1.27.1.2 Released
    Mar 31, 2025 · We are happy to announce the new formal release, 1.27.1.2, of the OpenResty web platform based on NGINX and LuaJIT. Download this version here.Missing: stable | Show results with:stable
  8. [8]
    Lua Resty Core Library - OpenResty
    Dec 14, 2013 · Reimplements the Lua API provided by Lua Nginx Module with LuaJIT FFI. Project homepage: https://github.com/openresty/lua-resty-core.
  9. [9]
    openresty/lua-nginx-module: Embed the Power of Lua into ... - GitHub
    This directive was first introduced in the v0.9.17 release. See also the following blog posts for more details on OpenResty and Nginx's shared memory zones: How ...
  10. [10]
    What's the story of OpenResty?
    Jan 15, 2014 · ... OpenResty? > This project was initially created when I was working for REST-style Open API platform for Yahoo! China in the year 2007. So ...Missing: origins | Show results with:origins
  11. [11]
    OpenResty-0.5.12
    ### Summary of OpenResty Perl Module
  12. [12]
    GitHub - agentzh/old-openresty: Obsolete 1st generation of OpenResty written mostly in Perl. Please check out the new OpenResty based on Nginx and Lua instead.
    - **Origins**: Developed by Yichun Zhang (agentzh) and contributors, initially created by Yahoo! China EEEE Works and Alibaba Inc.
  13. [13]
    Applications of ngx_openresty and perl at lz.taobao.com
    Applications of ngx_openresty and perl at lz.taobao.com. Applications of ngx_openresty and perl at lz.taobao.com ---- Applications of {{#x|ngx_openresty}} ...
  14. [14]
    The OpenResty 10-Year Community Report: OpenSource Projects
    Jun 10, 2020 · It was first created by Yichun Zhang in 2007, and you are most ... Gateway Config's Version Control & Release Management in OpenResty Edge October ...Missing: creator | Show results with:creator
  15. [15]
    About Us | OpenResty - Enterprise solutions
    OpenResty has been open-source since its inception. Over the years, users from ... Yichun Zhang (agentzh). Founder and CEO. Original creator of OpenResty.
  16. [16]
    ChangeLog 1.7.0 - OpenResty
    Jun 1, 2014 · 03 Apr 2025. OpenResty 1.27.1.2 Released · OpenResty® Linux Packages. 31 Mar 2025. Download · ChangeLog for 1.27.1.x. 17 Oct 2024. OpenResty ...Missing: history | Show results with:history
  17. [17]
    Changes - OpenResty
    Jul 8, 2012 · New! OpenResty 1.27.1.1 is now released! New! New blog post OpenResty XRay Empowers LLVM clang Performance Optimization Practices is published.Missing: September 2009<|control11|><|separator|>
  18. [18]
    ChangeLog for 1.27.1.x - OpenResty
    Aug 14, 2024 · Timeline. 03 Apr 2025. OpenResty 1.27.1.2 Released · OpenResty® Linux Packages. 31 Mar 2025. Download · ChangeLog for 1.27.1.x. 17 Oct 2024.Missing: history 1.7.
  19. [19]
    Knowledge of NGINX Used in OpenResty - API7.ai
    Sep 17, 2022 · In general, what you use in OpenResty are the basics of NGINX, mainly related to configuration, master-slave processes, execution phases, etc.
  20. [20]
    Lua Nginx Module - OpenResty
    Jun 21, 2011 · This module embeds the Lua interpreter or LuaJIT 2 into the nginx core and integrates the powerful Lua threads (aka Lua coroutines) into the Nginx event model.Missing: architecture master- worker directives
  21. [21]
    Installation - OpenResty
    Jun 21, 2011 · New! OpenResty 1.27.1.1 is now released! New! New blog post OpenResty XRay Empowers LLVM clang Performance Optimization Practices is published.
  22. [22]
    LuaJIT
    ### Summary of LuaJIT
  23. [23]
  24. [24]
  25. [25]
  26. [26]
  27. [27]
    openresty/lua-resty-redis: Lua redis client driver for the ... - GitHub
    This Lua library takes advantage of ngx_lua's cosocket API, which ensures 100% nonblocking behavior. Note that at least ngx_lua 0.5.14 or OpenResty 1.2.1.14 is ...
  28. [28]
  29. [29]
  30. [30]
  31. [31]
    openresty/stream-lua-nginx-module: Embed the power of ... - GitHub
    LuaJIT can be downloaded from the latest release of OpenResty's LuaJIT fork. The official LuaJIT 2.x releases are also supported, although performance will be ...
  32. [32]
    Srcache Nginx Module - OpenResty
    Jun 21, 2011 · This module provides a transparent caching layer for arbitrary nginx locations (like those use an upstream or even serve static disk files).
  33. [33]
    agentzh/lua-resty-http - OPM - OpenResty Package Manager
    Sep 29, 2016 · pool : Specifies a custom name for the connection pool being used. If omitted, then the connection pool name will be generated from the string ...
  34. [34]
    How OpenResty and Nginx Shared Memory Zones Consume RAM
    Aug 4, 2020 · In this article, we will explore how these shared memory zones consume physical memory (or RAM) by several minimal and self-contained examples.Empty zones · Zones with user data · Virtual memory and resident...
  35. [35]
    LuaJIT - OpenResty
    Jun 21, 2011 · LuaJIT is a Just-In-Time Compiler for the Lua programming language. Homepage: http://luajit.org/luajit.html LuaJIT is enabled by default since OpenResty 1.5.8. ...Missing: Taobao 2009
  36. [36]
    OpenResty's Branch of LuaJIT 2 - GitHub
    This is the official OpenResty branch of LuaJIT. It is not to be considered a fork, since we still regularly synchronize changes from the upstream LuaJIT ...Missing: Taobao 2009
  37. [37]
    Profiling - OpenResty
    Apr 29, 2014 · Profiling is important for analyzing and optimize OpenResty applications' performance. OpenResty Inc. provides a commercial anaysis product named OpenResty ...Missing: enhancements | Show results with:enhancements
  38. [38]
    Getting Started - OpenResty
    Jun 20, 2011 · View the documentation of each component at the Components page and find Nginx related stuff on the Nginx Wiki site. More Interesting Topics.Missing: key | Show results with:key
  39. [39]
    OpenResty® Linux Packages
    Jul 14, 2016 · New! OpenResty 1.27.1.1 is now released! New! New blog post OpenResty XRay Empowers LLVM clang Performance Optimization Practices is published.Missing: stable | Show results with:stable
  40. [40]
    Debugging - OpenResty
    Oct 6, 2013 · During Lua code development, you can disable the Lua code cache temporarily so that you do not have to reload the Nginx server for your ...
  41. [41]
    openresty/srcache-nginx-module: Transparent subrequest ... - GitHub
    This module provides a transparent caching layer for arbitrary nginx locations (like those use an upstream or even serve static disk files).
  42. [42]
    openresty/lua-resty-limit-traffic: Lua library for limiting and controlling ...
    This library provides several Lua modules to help OpenResty/ngx_lua users to control and limit the traffic, either request rate or request concurrency (or both) ...Missing: gateway | Show results with:gateway
  43. [43]
    CloudFlare's new WAF: compiling to Lua
    Aug 23, 2013 · The Lua WAF uses the nginx Lua module to embed Lua code and execute that code as part of the normal nginx handling of phases.Missing: backends | Show results with:backends
  44. [44]
    Community - OpenResty
    Aug 4, 2012 · OpenResty Lua modules and packages contributed by the community are managed by the OpenResty Package Manager (OPM).
  45. [45]
    OPM - OpenResty Package Manager
    opm is the official OpenResty package manager, similar to Perl's CPAN and NodeJS's npm in rationale. We provide both the opm client-side command-line utility ...DocsRecent uploads0.5.1Sign InGUI
  46. [46]
    maskshell/lua-resty-auto-ssl - OPM - OpenResty Package Manager
    Oct 11, 2025 · This OpenResty plugin automatically and transparently issues SSL certificates from Let's Encrypt (a free certificate authority) as requests are ...
  47. [47]
    OpenResty - GitHub
    A fast and scalable web platform by extending NGINX with LuaJIT. Commercial support is provided at https://openresty.com/
  48. [48]
    Events - OpenResty
    Nov 28, 2016 · English Events. Chinese Events. OpenResty Con 2016 (10 December 2016 9:00 AM +0800 at Shenzhen, China). https://con.openresty.org/cn/2016/.
  49. [49]
    OpenResty - YouTube
    We share all kinds of tutorials, conference presentations, and explanations about OpenResty and other open source software.
  50. [50]
    OpenResty: The Trusted Choice for Developers Worldwide - Blog
    Aug 11, 2025 · OpenResty Inc., the enterprise software start-up founded by Yichun in 2017, has customers from some of the biggest companies in the world.
  51. [51]
    Getting Involved - OpenResty
    Aug 3, 2013 · The OpenResty project has a loose organization. Most of the components are self-contained open-source projects and are developed separately.Missing: key | Show results with:key
  52. [52]
    OpenResty Edge™ Overview
    Jun 23, 2025 · OpenResty Edge is a platform based on the OpenResty open source web platform for setting up dynamic load balancers and reverse proxy clusters.
  53. [53]
    Platforms supported by OpenResty Edge
    Sep 17, 2025 · # Supported Distributions · # Ubuntu · # Debian · # CentOS · # Red Hat Enterprise Linux (RHEL) · # Rocky Linux · # Amazon Linux · # CTyunOS.
  54. [54]
    OpenResty XRay™ | OpenResty - Enterprise solutions
    A real-time, lightweight, noninvasive monitoring tool that helps you optimize resources and quickly troubleshoot and resolve complex issues. Learn MoreStart ...
  55. [55]
    OpenResty XRay Standard Analyzers
    OpenResty XRay provides standard analyzers for the following application types or stack stacks (the list is still growing fast).
  56. [56]
    A Quick Tour to OpenResty XRay's Web Console - Blog
    Nov 11, 2024 · This video provides a detailed demonstration of using the OpenResty XRay Web Console for real-time monitoring and management.Missing: Con | Show results with:Con
  57. [57]
    openresty/lua-resty-core: New FFI-based API for lua-nginx-module
    This pure Lua library reimplements part of the ngx_lua module's Nginx API for Lua with LuaJIT FFI and installs the new FFI-based Lua API into the ngx.* and ndk ...Releases · Issues 51 · Pull requests 18 · Actions
  58. [58]
    bsiara/lua-resty-openidc - OPM - OpenResty Package Manager
    lua-resty-openidc is a library for NGINX implementing the OpenID Connect Relying Party (RP) and/or the OAuth 2.0 Resource Server (RS) functionality.
  59. [59]
    Install Dependencies | Apache APISIX® -- Cloud-Native API ...
    OpenResty is a dependency of APISIX. If it is your first time to deploy APISIX and you don't need to use OpenResty to deploy other services, you can stop and ...
  60. [60]
    Why Apache APISIX chose Nginx and Lua to build API Gateway
    Aug 25, 2021 · Serious readers may point out that Apache APISIX is not based on the Nginx + Lua stack, but Nginx + LuaJIT (also known as OpenResty). LuaJIT is ...