[zeromq-dev] ZeroMQ scalability over connections quantity

Martin Sustrik sustrik at fastmq.com
Wed Mar 25 11:37:18 CET 2009

Hi Peter,

 > I'm looking for a fast, simple, reliable, scalable and predictable 
(;) message queue.
 > Info that I'm missing - ability of zmq_server to handle as many 
sessions as possible preserving high performance.
 > Per connections# scalability is not presented in your benchmark results.
 > Did you run per connection# scalability tests? Would be very grateful 
to see such results as it is one of major criteria in the case.

0MQ uses the most scalable (w.r.t. number of connections) polling 
mechanism available on the specific platform. Thus, if you are running 
it on Linux, epoll will be used by default rather than select or poll etc.

However, there's still a bottleneck in the code used to look for next 
active connection. It's discussed currently on the list and a patch was 
already posted:


We are still discussing some minor (constant time) optimisations with 
respect to the patch, however, if you use it even in the current state 
0MQ should scale reasonably with the number of connection. "Reasonable" 
meaning that it adds a constant overhead to underlying polling 
mechanism. For scalability tests of polling mechanisms have a look at 
the web. For example:


 > BTW, I tried the server connection tolerance with "telnet localhost 
5682" with some text printed - zmq_server failed. In my view, makes 
sense to add some error handling there.

This is version 0.5, right? The issue have been fixed in the trunk and 
the fix will be part of 0.6 release.


More information about the zeromq-dev mailing list