Hello!
On Sat, Feb 15, 2014 at 9:15 AM, <milspec@gmx.de> wrote:
> I want to create an application:
>
> -that uses luajit + ngx lua + lua_resty_mysql + shdict
> -that listens on a freely defined tcp-socket and uses my own non-http
> protocol
>
Maybe you can directly use the websocket protocol here? ngx_lua
supports websocket via the lua-resty-websocket library:
https://github.com/agentzh/lua-resty-websocket
> I've read you are planning to release such a module (ngx_tcp_lua).
> When will you release it?
>
When I get a working implementation for it. You may also want to look
at the 3rd-party ngx_tcp_lua contributed by bigplum:
https://github.com/bigplum/nginx-tcp-lua-module
though this module is based on the code base of a quite old version of ngx_lua.
> Does it distribute client requests over all cores made available to nginx or
> is it limited to a single core?
>
Nginx's multi-worker-process model is designed for distributing the
computation across all the (logical) CPU cores. So any nginx module
(including ngx_tcp_lua mentioned above) uses the same process model of
nginx.
> What happens to connected clients when you update the Lua-script and issue a
> "kill -hup" to nginx to reload the new script?
This is NGINX's default behavior: old NGINX workers stop accepting new
connections but will continue running until all the existing requests
get served properly while new NGINX workers start serving new
connections.
> Are the clients then forcibly
> disconnected?
>
Of course not. Otherwise the behavior is considered totally broken.
I'm cc'ing the openresty-en mailing list. You're recommended to
discuss such things on the list. Thank you for your cooperation!
Regards,
-agentzh