[zeromq-dev] Multiple clients with REQ/REP

Gregg Jensen g_jensen at swbell.net
Fri Jul 25 03:30:40 CEST 2014

I currently using zeromq 3.2.3 and will be upgrading to the latest soon, but for now my question relates to this older version.

I have been use the REQ/REP socket types for single client to single server with great success.  And according to the guide now that I want to move up to the final goal of multiple clients to a single server,  I was under the impression that I am supposed to changed the clients to include the identity, and then use a ROUTER to DEALER proxy which  delivers to REP worker processes that have been spawned off in separate threads.  I have code that will do this, however I have some problems with the processing in the threads.  But, that is not the question.  I backed out the code that does the ROUTER/DEALER/workers and went back to just the one REP socket on the server that spawns the processing on a thread upon recv.  I went back to run my multi-client test and bingo it all worked great.  Therein lies my question.  How many client REQ connections will the standard REP socket handle?  Can I leave my code with just REQ/REP and not move to REQ->ROUTER/DEALER/workers?  That is, will it scale up to 100’s, 1000’s or  even 100,000s (given good hardware) connections?  Will the client connections all stay aligned with the socket connection they make the request to?  If so, then why would I want that pattern on the server of ROUTER to DEALER (proxy) out to workers in separate threads?

More information about the zeromq-dev mailing list