-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic front-end interface for ngx_lua #179
Comments
Hello! Maybe you want to take a look at the ngx_tcp_lua module prototype done by
You can check out his original announcement on the openresty mailing list http://groups.google.com/group/openresty/browse_thread/thread/cfd7da68d9a30182 I hope I can merge his work with ngx_http_lua_module at some point to Best regards, |
Yeah, that's basically the idea I had in mind, except that using 'tcp' conflicts with the tcp proxy module (which I actually use in one of my projects). I would probably just switch to using ngx_tcp_lua, though, so it wouldn't be a problem. What might be a good way to go is to make the interfaces generic ngx_xxx_lua interface, which can then be used by both ngx_http_lua and ngx_tcp_lua, with an extra interface wrapper where needed around the API stuff. |
Hello! On Thu, Nov 22, 2012 at 12:13 AM, simpl.it notifications@github.com wrote:
Yes, that's the way to go :) Best regards, |
I'll try to help you out with this porting at some stage. I can't right now, but maybe some time in the new year. |
Thank you in advance! :) |
Since nginx stream module is open source now, it there any plan to add stream lua support in ngx_lua module ? |
@deltay Yes, it's on the TODO list and the development work is expected to begin (and finish) in Q4. |
The ngx_stream_lua_module is now available for testing: https://github.com/openresty/stream-lua-nginx-module Feedback welcome! Since this module already allows what this ticket was asking for, I'm closing this. |
Have you considered the idea of creating a front-end socket configuration for ngx_lua (i.e. an interface on which ngx_lua can accept incoming connections)? Thus any type of server could use the power of ngx_lua, not just an HTTP(S) one, sort of in a similar way to Node.js.
It could be implemented in a top-level lua { ... } block (instead of the http {} block, and there could be similar server {} blocks, with core settings like listen, buffer sizes etc could be set in the config file but the large part of the processing could be done by Lua, including all the header parsing.
I'm fairly sure it would then probably be possible to implement an HTTP server that was quite a bit quicker than Nginx, but I can also see other possibilities. You could create your own Memcached/Redis implementation, perhaps performing some kind of cluster management while keeping the logic away from the connecting service.
The text was updated successfully, but these errors were encountered: