• Stars
    star
    902
  • Rank 50,637 (Top 1.0 %)
  • Language
    C
  • Created almost 14 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Nginx upstream module for the Redis 2.0 protocol

Name

ngx_redis2 - Nginx upstream module for the Redis 2.0 protocol

This module is not distributed with the Nginx source. See the installation instructions.

Table of Contents

Status

This module is already production ready.

Version

This document describes ngx_redis2 v0.15 released on 19 April 2018.

Synopsis

 location = /foo {
     set $value 'first';
     redis2_query set one $value;
     redis2_pass 127.0.0.1:6379;
 }

 # GET /get?key=some_key
 location = /get {
     set_unescape_uri $key $arg_key;  # this requires ngx_set_misc
     redis2_query get $key;
     redis2_pass foo.com:6379;
 }

 # GET /set?key=one&val=first%20value
 location = /set {
     set_unescape_uri $key $arg_key;  # this requires ngx_set_misc
     set_unescape_uri $val $arg_val;  # this requires ngx_set_misc
     redis2_query set $key $val;
     redis2_pass foo.com:6379;
 }

 # multiple pipelined queries
 location = /foo {
     set $value 'first';
     redis2_query set one $value;
     redis2_query get one;
     redis2_query set one two;
     redis2_query get one;
     redis2_pass 127.0.0.1:6379;
 }

 location = /bar {
     # $ is not special here...
     redis2_literal_raw_query '*1\r\n$4\r\nping\r\n';
     redis2_pass 127.0.0.1:6379;
 }

 location = /bar {
     # variables can be used below and $ is special
     redis2_raw_query 'get one\r\n';
     redis2_pass 127.0.0.1:6379;
 }

 # GET /baz?get%20foo%0d%0a
 location = /baz {
     set_unescape_uri $query $query_string; # this requires the ngx_set_misc module
     redis2_raw_query $query;
     redis2_pass 127.0.0.1:6379;
 }

 location = /init {
     redis2_query del key1;
     redis2_query lpush key1 C;
     redis2_query lpush key1 B;
     redis2_query lpush key1 A;
     redis2_pass 127.0.0.1:6379;
 }

 location = /get {
     redis2_query lrange key1 0 -1;
     redis2_pass 127.0.0.1:6379;
 }

Back to TOC

Description

This is an Nginx upstream module that makes nginx talk to a Redis 2.x server in a non-blocking way. The full Redis 2.0 unified protocol has been implemented including the Redis pipelining support.

This module returns the raw TCP response from the Redis server. It's recommended to use my lua-redis-parser (written in pure C) to parse these responses into lua data structure when combined with lua-nginx-module.

When used in conjunction with lua-nginx-module, it is recommended to use the lua-resty-redis library instead of this module though, because the former is much more flexible and memory-efficient.

If you only want to use the get redis command, you can try out the HttpRedisModule. It returns the parsed content part of the Redis response because only get is needed to implement.

Another option is to parse the redis responses on your client side yourself.

Back to TOC

Directives

Back to TOC

redis2_query

syntax: redis2_query cmd arg1 arg2 ...

default: no

context: location, location if

Specify a Redis command by specifying its individual arguments (including the Redis command name itself) in a similar way to the redis-cli utility.

Multiple instances of this directive are allowed in a single location and these queries will be pipelined. For example,

 location = /pipelined {
     redis2_query set hello world;
     redis2_query get hello;

     redis2_pass 127.0.0.1:$TEST_NGINX_REDIS_PORT;
 }

then GET /pipelined will yield two successive raw Redis responses

 +OK
 $5
 world

while newlines here are actually CR LF (\r\n).

Back to TOC

redis2_raw_query

syntax: redis2_raw_query QUERY

default: no

context: location, location if

Specify raw Redis queries and nginx variables are recognized in the QUERY argument.

Only one Redis command is allowed in the QUERY argument, or you'll receive an error. If you want to specify multiple pipelined commands in a single query, use the redis2_raw_queries directive instead.

Back to TOC

redis2_raw_queries

syntax: redis2_raw_queries N QUERIES

default: no

context: location, location if

Specify N commands in the QUERIES argument. Both the N and QUERIES arguments can take Nginx variables.

Here's some examples

 location = /pipelined {
     redis2_raw_queries 3 "flushall\r\nget key1\r\nget key2\r\n";
     redis2_pass 127.0.0.1:6379;
 }

 # GET /pipelined2?n=2&cmds=flushall%0D%0Aget%20key%0D%0A
 location = /pipelined2 {
     set_unescape_uri $n $arg_n;
     set_unescape_uri $cmds $arg_cmds;

     redis2_raw_queries $n $cmds;

     redis2_pass 127.0.0.1:6379;
 }

Note that in the second sample above, the set_unescape_uri directive is provided by the set-misc-nginx-module.

Back to TOC

redis2_literal_raw_query

syntax: redis2_literal_raw_query QUERY

default: no

context: location, location if

Specify a raw Redis query but Nginx variables in it will not be not recognized. In other words, you're free to use the dollar sign character ($) in your QUERY argument.

Only One redis command is allowed in the QUERY argument.

Back to TOC

redis2_pass

syntax: redis2_pass <upstream_name>

syntax: redis2_pass <host>:<port>

default: no

context: location, location if

phase: content

Specify the Redis server backend.

Back to TOC

redis2_connect_timeout

syntax: redis2_connect_timeout <time>

default: 60s

context: http, server, location

The timeout for connecting to the Redis server, in seconds by default.

It's wise to always explicitly specify the time unit to avoid confusion. Time units supported are s(seconds), ms(milliseconds), y(years), M(months), w(weeks), d(days), h(hours), and m(minutes).

This time must be less than 597 hours.

Back to TOC

redis2_send_timeout

syntax: redis2_send_timeout <time>

default: 60s

context: http, server, location

The timeout for sending TCP requests to the Redis server, in seconds by default.

It's wise to always explicitly specify the time unit to avoid confusion. Time units supported are s(seconds), ms(milliseconds), y(years), M(months), w(weeks), d(days), h(hours), and m(minutes).

Back to TOC

redis2_read_timeout

syntax: redis2_read_timeout <time>

default: 60s

context: http, server, location

The timeout for reading TCP responses from the redis server, in seconds by default.

It's wise to always explicitly specify the time unit to avoid confusion. Time units supported are s(seconds), ms(milliseconds), y(years), M(months), w(weeks), d(days), h(hours), and m(minutes).

Back to TOC

redis2_buffer_size

syntax: redis2_buffer_size <size>

default: 4k/8k

context: http, server, location

This buffer size is used for reading Redis replies, but it's not required to be as big as the largest possible Redis reply.

This default size is the page size, may be 4k or 8k.

Back to TOC

redis2_next_upstream

syntax: redis2_next_upstream [ error | timeout | invalid_response | off ]

default: error timeout

context: http, server, location

Specify which failure conditions should cause the request to be forwarded to another upstream server. Applies only when the value in redis2_pass is an upstream with two or more servers.

Here's an artificial example:

 upstream redis_cluster {
     server 127.0.0.1:6379;
     server 127.0.0.1:6380;
 }

 server {
     location = /redis {
         redis2_next_upstream error timeout invalid_response;
         redis2_query get foo;
         redis2_pass redis_cluster;
     }
 }

Back to TOC

Connection Pool

You can use the excellent HttpUpstreamKeepaliveModule with this module to provide TCP connection pool for Redis.

A sample config snippet looks like this

 http {
     upstream backend {
       server 127.0.0.1:6379;

       # a pool with at most 1024 connections
       # and do not distinguish the servers:
       keepalive 1024;
     }

     server {
         ...
         location = /redis {
             set_unescape_uri $query $arg_query;
             redis2_query $query;
             redis2_pass backend;
         }
     }
 }

Back to TOC

Selecting Redis Databases

Redis provides the select command to switch Redis databaess. This command is no different from other normal commands like get or set. So you can use them in redis2_query directives, for example,

redis2_query select 8;
redis2_query get foo;

Back to TOC

Lua Interoperability

This module can be served as a non-blocking redis2 client for lua-nginx-module (but nowadays it is recommended to use the lua-resty-redis library instead, which is much simpler to use and more efficient most of the time). Here's an example using a GET subrequest:

 location = /redis {
     internal;

     # set_unescape_uri is provided by ngx_set_misc
     set_unescape_uri $query $arg_query;

     redis2_raw_query $query;
     redis2_pass 127.0.0.1:6379;
 }

 location = /main {
     content_by_lua '
         local res = ngx.location.capture("/redis",
             { args = { query = "ping\\r\\n" } }
         )
         ngx.print("[" .. res.body .. "]")
     ';
 }

Then accessing /main yields

[+PONG\r\n]

where \r\n is CRLF. That is, this module returns the raw TCP responses from the remote redis server. For Lua-based application developers, they may want to utilize the lua-redis-parser library (written in pure C) to parse such raw responses into Lua data structures.

When moving the inlined Lua code into an external .lua file, it's important to use the escape sequence \r\n directly. We used \\r\\n above just because the Lua code itself needs quoting when being put into an Nginx string literal.

You can also use POST/PUT subrequests to transfer the raw Redis request via request body, which does not require URI escaping and unescaping, thus saving some CPU cycles. Here's such an example:

 location = /redis {
     internal;

     # $echo_request_body is provided by the ngx_echo module
     redis2_raw_query $echo_request_body;

     redis2_pass 127.0.0.1:6379;
 }

 location = /main {
     content_by_lua '
         local res = ngx.location.capture("/redis",
             { method = ngx.HTTP_PUT,
               body = "ping\\r\\n" }
         )
         ngx.print("[" .. res.body .. "]")
     ';
 }

Important The nginx variable $request_body only contains content buffered into memory. If nginx writes the request body to a temporary file (default behavior) the $request_body will not include the entire content or may be empty. It's recommended to use $echo_request_body which reads the full request body (regardless of being in buffer or temporary file).

This yeilds exactly the same output as the previous (GET) sample.

One can also use Lua to pick up a concrete Redis backend based on some complicated hashing rules. For instance,

 upstream redis-a {
     server foo.bar.com:6379;
 }

 upstream redis-b {
     server bar.baz.com:6379;
 }

 upstream redis-c {
     server blah.blah.org:6379;
 }

 server {
     ...

     location = /redis {
         set_unescape_uri $query $arg_query;
         redis2_query $query;
         redis2_pass $arg_backend;
     }

     location = /foo {
         content_by_lua "
             -- pick up a server randomly
             local servers = {'redis-a', 'redis-b', 'redis-c'}
             local i = ngx.time() % #servers + 1;
             local srv = servers[i]

             local res = ngx.location.capture('/redis',
                 { args = {
                     query = '...',
                     backend = srv
                   }
                 }
             )
             ngx.say(res.body)
         ";
     }
 }

Back to TOC

Pipelined Redis Requests by Lua

Here's a complete example demonstrating how to use Lua to issue multiple pipelined Redis requests via this Nginx module.

First of all, we include the following in our nginx.conf file:

 location = /redis2 {
     internal;

     redis2_raw_queries $args $echo_request_body;
     redis2_pass 127.0.0.1:6379;
 }

 location = /test {
     content_by_lua_file conf/test.lua;
 }

Basically we use URI query args to pass the number of Redis requests and request body to pass the pipelined Redis request string.

And then we create the conf/test.lua file (whose path is relative to the server root of Nginx) to include the following Lua code:

 -- conf/test.lua
 local parser = require "redis.parser"

 local reqs = {
     {"set", "foo", "hello world"},
     {"get", "foo"}
 }

 local raw_reqs = {}
 for i, req in ipairs(reqs) do
     table.insert(raw_reqs, parser.build_query(req))
 end

 local res = ngx.location.capture("/redis2?" .. #reqs,
     { body = table.concat(raw_reqs, "") })

 if res.status ~= 200 or not res.body then
     ngx.log(ngx.ERR, "failed to query redis")
     ngx.exit(500)
 end

 local replies = parser.parse_replies(res.body, #reqs)
 for i, reply in ipairs(replies) do
     ngx.say(reply[1])
 end

Here we assume that your Redis server is listening on the default port (6379) of the localhost. We also make use of the lua-redis-parser library to construct raw Redis queries for us and also use it to parse the replies.

Accessing the /test location via HTTP clients like curl yields the following output

OK
hello world

A more realistic setting is to use a proper upstream definition for our Redis backend and enable TCP connection pool via the keepalive directive in it.

Back to TOC

Redis Publish/Subscribe Support

This module has limited support for Redis publish/subscribe feature. It cannot be fully supported due to the stateless nature of REST and HTTP model.

Consider the following example:

 location = /redis {
     redis2_raw_queries 2 "subscribe /foo/bar\r\n";
     redis2_pass 127.0.0.1:6379;
 }

And then publish a message for the key /foo/bar in the redis-cli command line. And then you'll receive two multi-bulk replies from the /redis location.

You can surely parse the replies with the lua-redis-parser library if you're using Lua to access this module's location.

Back to TOC

Limitations For Redis Publish/Subscribe

If you want to use the Redis pub/sub feature with this module, then you must note the following limitations:

  • You cannot use HttpUpstreamKeepaliveModule with this Redis upstream. Only short Redis connections will work.
  • There may be some race conditions that produce the harmless Redis server returned extra bytes warnings in your nginx's error.log. Such warnings might be rare but just be prepared for it.
  • You should tune the various timeout settings provided by this module like redis2_connect_timeout and redis2_read_timeout.

If you cannot stand these limitations, then you are highly recommended to switch to the lua-resty-redis library for lua-nginx-module.

Back to TOC

Performance Tuning

  • When you're using this module, please ensure you're using a TCP connection pool (provided by HttpUpstreamKeepaliveModule) and Redis pipelining wherever possible. These features will significantly improve performance.
  • Using multiple instance of Redis servers on your multi-core machines also help a lot due to the sequential processing nature of a single Redis server instance.
  • When you're benchmarking performance using something like ab or http_load, please ensure that your error log level is high enough (like warn) to prevent Nginx workers spend too much cycles on flushing the error.log file, which is always non-buffered and blocking and thus very expensive.

Back to TOC

Installation

You are recommended to install this module (as well as the Nginx core and many many other goodies) via the ngx_openresty bundle. Check out the installation instructions for setting up ngx_openresty.

Alternatively, you can install this module manually by recompiling the standard Nginx core as follows:

  • Grab the nginx source code from nginx.org, for example, the version 1.11.2 (see nginx compatibility),
  • and then download the latest version of the release tarball of this module from ngx_redis2's file list.
  • and finally build the source with this module:
 wget 'http://nginx.org/download/nginx-1.11.2.tar.gz'
 tar -xzvf nginx-1.11.2.tar.gz
 cd nginx-1.11.2/

 # Here we assume you would install you nginx under /opt/nginx/.
 ./configure --prefix=/opt/nginx \
             --add-module=/path/to/redis2-nginx-module

 make -j2
 make install

Starting from NGINX 1.9.11, you can also compile this module as a dynamic module, by using the --add-dynamic-module=PATH option instead of --add-module=PATH on the ./configure command line above. And then you can explicitly load the module in your nginx.conf via the load_module directive, for example,

load_module /path/to/modules/ngx_http_redis2_module.so;

Back to TOC

Compatibility

Redis 2.0, 2.2, 2.4, and above should work with this module without any issues. So is the Alchemy Database (aka redisql in its early days).

The following versions of Nginx should work with this module:

  • 1.17.x (last tested: 1.17.4)
  • 1.16.x
  • 1.15.x (last tested: 1.15.8)
  • 1.14.x
  • 1.13.x (last tested: 1.13.6)
  • 1.12.x
  • 1.11.x (last tested: 1.11.2)
  • 1.10.x
  • 1.9.x (last tested: 1.9.15)
  • 1.8.x
  • 1.7.x (last tested: 1.7.10)
  • 1.6.x
  • 1.5.x (last tested: 1.5.12)
  • 1.4.x (last tested: 1.4.3)
  • 1.3.x (last tested: 1.3.7)
  • 1.2.x (last tested: 1.2.7)
  • 1.1.x (last tested: 1.1.5)
  • 1.0.x (last tested: 1.0.10)
  • 0.9.x (last tested: 0.9.4)
  • 0.8.x >= 0.8.31 (last tested: 0.8.54)

Earlier versions of Nginx will not work.

If you find that any particular version of Nginx above 0.8.31 does not work with this module, please consider reporting a bug.

Back to TOC

Community

Back to TOC

English Mailing List

The openresty-en mailing list is for English speakers.

Back to TOC

Chinese Mailing List

The openresty mailing list is for Chinese speakers.

Back to TOC

Bugs and Patches

Please submit bug reports, wishlists, or patches by

  1. creating a ticket on the GitHub Issue Tracker,
  2. or posting to the OpenResty community.

Back to TOC

Source Repository

Available on github at openresty/redis2-nginx-module.

Back to TOC

TODO

  • Add the redis2_as_json directive to allow emitting JSON directly.

Back to TOC

Author

Yichun "agentzh" Zhang (章亦春) [email protected], OpenResty Inc.

Back to TOC

Getting involved

You'll be very welcomed to submit patches to the author or just ask for a commit bit to the source repository on GitHub.

Back to TOC

Copyright & License

This module is licenced under the BSD license.

Copyright (C) 2010-2018, by Yichun "agentzh" Zhang (章亦春) [email protected], OpenResty Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Back to TOC

SEE ALSO

Back to TOC

More Repositories

1

openresty

High Performance Web Platform Based on Nginx and LuaJIT
C
12,431
star
2

lua-nginx-module

Embed the Power of Lua into NGINX HTTP servers
C
11,224
star
3

nginx-tutorials

Nginx Tutorials
Perl
2,864
star
4

lua-resty-redis

Lua redis client driver for the ngx_lua based on the cosocket API
Lua
1,893
star
5

openresty-systemtap-toolkit

Real-time analysis and diagnostics tools for OpenResty (including NGINX, LuaJIT, ngx_lua, and more) based on SystemTap
Perl
1,653
star
6

headers-more-nginx-module

Set, add, and clear arbitrary output headers in NGINX http servers
C
1,636
star
7

openresty.org

Code and data for the openresty.org site
HTML
1,262
star
8

luajit2

OpenResty's Branch of LuaJIT 2
C
1,229
star
9

echo-nginx-module

An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file
C
1,162
star
10

docker-openresty

Docker tooling for OpenResty
Dockerfile
934
star
11

lua-resty-limit-traffic

Lua library for limiting and controlling traffic in OpenResty/ngx_lua
Lua
815
star
12

lua-resty-core

New FFI-based API for lua-nginx-module
Lua
797
star
13

stream-lua-nginx-module

Embed the power of Lua into NGINX TCP/UDP servers
C
723
star
14

lua-resty-mysql

Nonblocking Lua MySQL driver library for ngx_lua or OpenResty
Lua
703
star
15

stapxx

Simple macro language extentions to systemtap
Perl
692
star
16

sregex

A non-backtracking NFA/DFA-based Perl-compatible regex engine matching on large data streams
C
616
star
17

lua-resty-upstream-healthcheck

Health Checker for Nginx Upstream Servers in Pure Lua
Lua
513
star
18

lua-resty-websocket

WebSocket support for the ngx_lua module (and OpenResty)
Lua
503
star
19

lua-upstream-nginx-module

Nginx C module to expose Lua API to ngx_lua for Nginx upstreams
C
499
star
20

srcache-nginx-module

Transparent subrequest-based caching layout for arbitrary nginx locations.
C
474
star
21

opm

OpenResty Package Manager
Lua
458
star
22

test-nginx

Data-driven test scaffold for Nginx C module and OpenResty Lua library development
Perl
438
star
23

lua-resty-lrucache

Lua-land LRU Cache based on LuaJIT FFI
Lua
437
star
24

lua-resty-string

String utilities and common hash functions for ngx_lua and LuaJIT
Lua
426
star
25

lua-resty-upload

Streaming reader and parser for http file uploading based on ngx_lua cosocket
Lua
401
star
26

set-misc-nginx-module

Various set_xxx directives added to nginx's rewrite module (md5/sha1, sql/json quoting, and many more)
C
388
star
27

drizzle-nginx-module

an nginx upstream module that talks to mysql and drizzle by libdrizzle
C
336
star
28

openresty-gdb-utils

GDB Utilities for OpenResty (including Nginx, ngx_lua, LuaJIT, and more)
Python
335
star
29

lua-resty-balancer

A generic consistent hash implementation for OpenResty/Lua
Lua
325
star
30

lua-resty-dns

DNS resolver for the nginx lua module
Lua
321
star
31

programming-openresty

Programming OpenResty Book
Perl
317
star
32

lua-resty-lock

Simple nonblocking lock API for ngx_lua based on shared memory dictionaries
Lua
304
star
33

openresty-devel-utils

Utilities for nginx module development
Perl
266
star
34

resty-cli

Fancy command-line utilities for OpenResty
Perl
263
star
35

replace-filter-nginx-module

Streaming regular expression replacement in response bodies
C
258
star
36

memc-nginx-module

An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.
C
213
star
37

lua-resty-memcached

Lua memcached client driver for the ngx_lua based on the cosocket API
Lua
210
star
38

encrypted-session-nginx-module

encrypt and decrypt nginx variable values
C
198
star
39

openresty-packaging

Official OpenResty packaging source and scripts for various Linux distributions and other systems
Makefile
176
star
40

rds-json-nginx-module

An nginx output filter that formats Resty DBD Streams generated by ngx_drizzle and others to JSON
C
153
star
41

xss-nginx-module

Native support for cross-site scripting (XSS) in an nginx
C
148
star
42

mockeagain

Mocking ideally slow network that only allows reading and/or writing one byte at a time
C
129
star
43

lua-resty-shell

Lua module for nonblocking system shell command executions
Perl
124
star
44

lua-tablepool

Lua table recycling pools for LuaJIT
Perl
112
star
45

lua-redis-parser

Lua module for parsing raw redis responses
C
93
star
46

openresty-survey

OpenResty Web App for OpenResty User Survey
HTML
90
star
47

lua-ssl-nginx-module

NGINX C module that extends ngx_http_lua_module for enhanced SSL/TLS capabilities
Lua
86
star
48

opsboy

A rule-based sysadmin tool that helps setting up complex environment for blank machines
Perl
85
star
49

no-pool-nginx

replace nginx's pool mechanism with plain malloc & free to help tools like valgrind
Shell
77
star
50

stream-echo-nginx-module

TCP/stream echo module for NGINX (a port of ngx_http_echo_module)
C
69
star
51

meta-lua-nginx-module

Meta Lua Nginx Module supporting both Http Lua Module and Stream Lua Module
C
66
star
52

array-var-nginx-module

Add support for array-typed variables to nginx config files
C
66
star
53

lemplate

OpenResty/Lua template framework implementing Perl's TT2 templating language
Perl
54
star
54

openresty-con

JavaScript
48
star
55

nginx-dtrace

An nginx fork that adds dtrace USDT probes
C
44
star
56

orbpf-ko

The orbpf (eBPF+) Linux kernel module from OpenResty Inc.
C
37
star
57

lua-resty-memcached-shdict

Powerful memcached client with a shdict caching layer and many other features
Lua
33
star
58

lua-resty-signal

Lua library for killing or sending signals to UNIX processes
Perl
32
star
59

lua-resty-shdict-simple

Simple applicaton-oriented interface to the OpenResty shared dictionary API
Perl
32
star
60

luajit2-test-suite

OpenResty's LuaJIT test suite based on Mike Pall's LuaJIT tests
Lua
29
star
61

ngx_postgres

OpenResty's fork of FRiCKLE/ngx_postgres
C
26
star
62

rds-csv-nginx-module

Nginx output filter module to convert Resty-DBD-Streams (RDS) to Comma-Separated Values (CSV)
C
22
star
63

showman-samples

Sample screenplay files for generating our public video tutorials using OpenResty Showman
20
star
64

lua-rds-parser

Resty DBD Stream (RDS) parser for Lua written in C
C
19
star
65

redis-nginx-module

8
star
66

AB-test-http

test http requests between two systems.
Perl
5
star
67

transparency

2
star