I see this new NGINX+ZeroMQ project on github and am now confused.
What are the feature and scalability differences between Mongrel2 and NGINX+ZeroMQ.
(The reason why I ask is because I'm under the impression Mongrel2 was solely created since NGINX didn't support ZeroMQ)
I also read about the nginx+zeromq module and I immediately spotted a considerable difference.
ZeroMQ nginx module uses REQ/REP sockets to communicate with the backend processes. On the other hand mongrel2 uses two sockets. One PUSH/PULL to send messages downstream (to the handlers) and one PUB/SUB (to receive responses from handlers). This makes it totally asynchronous. When mongrel2 sends a request to the backend handlers it returns immediately from the zmq_send() call and the response will be received in another socket, anytime later.
Another difference is that mongrel2 is capable of sending the same response to more than one client. Your handler can tell mongrel2 something like this: "Deliver this response to connections 4, 5, 6 and 10, please". Mongrel2 send the connection ID within the message to the handlers.
Hope this helps! =)
NGINX+ZeroMQ has bugs. 1. It does not work with NGINX 1.5 reason NGINX before doing send to ZMQ server(for that it calls send chain) upstream hook, tests whether connection is valid or not. And it would fail because it has ZMQ socket and not TCP socket as protocol is different it would say its an invalid connection.
There are plenty more like that.
This module does not support keepalive. Not only upstream but even downstream would not work. I am struggling with making keepalive work at downstream.
My recommendation: It would take two man month to implement ZMQ NGINX with keepalive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With