nginx, echo module & lua

agentzh agentzh at
Wed May 2 15:10:26 UTC 2012

On Wed, May 2, 2012 at 9:39 PM, Pierre <serarien at> wrote:
>> But you're encouraged to try out ngx_lua's cosocket API to avoid
>> subrequests altogether. And the cosocket stuff does not have such
>> limitations.
> hmm, any more documentation about that ?

See the official documentation for ngx_lua cosocket:

> More about: how to implement it in my lua scripts ?
> is that it ? :
> local tcp = ngx.socket.tcp
> function new(self)
>    return setmetatable({ sock = tcp() }, mt)
> end
> ?

See the lua-resty-redis, lua-resty-memcached, and lua-resty-mysql
libraries as examples:

bigplum has been working on lua-resty-mongol:

I'm not sure about its state, but you can read the document or contact
the author directly.

Best regards,

More information about the nginx mailing list