Introduction to openresty
Reference: http://openresty.org/cn/index.html
Agentzh (Zhang Yichun)'s openresty open-source project (based on nginx) has greatly expanded the capabilities of nginx through various plug-ins and modules, lua extension can be used to customize complicated business logic. The new features granted by the author to nginx make openresty easier in business development and more friendly to programmers, developers can directly use some advanced features without getting familiar with the nginx source code, such as concurrent subrequest, DNS asynchronous resolution, and third-party databases (such as MySQL, redis, and memcached).
Let's take a brief look at the extended agentzh modules:
- Luajit Interpreter
- Arrayvarnginxmodule supports array variables.
- Authrequestnginxmodule
- Coolkitnginxmodule
- Drizzlenginxmodule supports MySQL access
- EchonginxmoduleA bunch of commands similar to shell commands support (Serial/parallel) Sub-requests. This module is cool and practical.
- Encryptedsessionnginxmodule
- Forminputnginxmodule
- Headersmorenginxmodule HTTP Header Processing
- Iconvnginxmodule
- Standardluainterpreter standard Lua interpreter
- Memcnginxmodule supports access to memcached
- Nginxdevelkit
- Luacjsonlibrary JSON Library
- Luanginxmodule Lua interface library (implemented in C)
- Luardsparserlibrary RDS Format Parsing
- Luaredisparserlibrary redis Response Parsing Library
- Luarestycorelibrary luanginxmodule Lua implementation
- Luarestydnslibrary DNS Library
- Luarestylocklibrary
- Luarestylrucachelibrary LRU cache Library
- Luarestymemcachedlibrary memcached access interface
- Luarestymysqllibrary MySQL access interface
- Luarestyredislibrary redis access interface
- Luarestystringlibrary APIs for some hash functions
- Luarestyuploadlibrary
- Luarestyupstreamhealthchecklibrary
- Luarestywebsocketlibrary WB protocol Parsing Library
- Luaupstreamnginxmodule extends upstream support
- Postgresnginxmodule supports access to ipvs Database
- The rdscsvnginxmodule filter module formats the responses of drizzle and ipvs modules into CSV output.
- Rdsjsonnginxmodule filter module, which formats the responses of drizzle and ipvs modules into JSON output.
- Redisnginxmodule supports access to redis (only select and get commands are supported)
- Redis2nginxmodule supports access to redis (supports all redis commands)
- Setmiscnginxmodule: A Bunch Of set commands used to set variables
- Srcachenginxmodule performs cache through sub-Requests
- Xssnginxmodule
View the above modules:
1. the upstream mechanism can support access to databases such as MySQL, redis, PostgreSQL, and memcached (all of which are asynchronous and non-blocking );
2. modules related to Lua extensions are highlighted in blue and provided to the Lua script library for calling. The APIs are rich and involve various operations;
Introduction to openresty