Open agentzh opened 7 years ago
Hi Yichun,
How about this issue now? It's really a good feature. I just meet the performance issue when I use redis as an inter-process communications channel. Just get 3333 rps, which is not good enough, and I only use redis pub/sub fire event, use share dict for data sharing(it's not the limitation, in my case). I try to use cosocket listen and accept, but it's failed. Do you have some advice, or do you have partially finished code I can reference?
Thx, Arthur
I use this lib(https://github.com/slact/ngx_lua_ipc) as a workaround, achieve 100 times faster result, from 3.3k rps to 330k rps, which only be used to transfer event among workers.
We need a nonblocking implementation for the
listen()
andaccept()
methods on the stream-typed sockets to allow individual NGINX worker processes to listen on some port or local unix domain socket files.This will open the door for efficient inter-process communications and control-flow synchronizations among NGINX worker processes.