[zeromq-dev] In the high-concurrency env, REQ-REP mode is not fast?

Chen Qi kaka11.chen at gmail.com
Fri Jun 8 14:53:37 CEST 2012

在 2012-6-8,下午8:37, Pieter Hintjens 写道:

> On Fri, Jun 8, 2012 at 12:10 AM, kaka chen <kaka11.chen at gmail.com> wrote:
>> Sorry, got it, I found it should share one context in all client threads,
>> then will be fast again. I think the problem is the context is very heavy,
>> cost many resources, am I right?
> No, the problem is that REQ-REP is fully synchronous so you are doing
> a round-trip for each message.
> Please read the Guide and follow the examples for doing asynchronous
> request-reply using ROUTER/DEALER sockets.
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

I know this is a fully synchronous mode. I use this mode to test the TPS(transaction per seconds), send a request until recv reply then send next request, but I found if I didn't share context with all client threads, it will be slow, thanks!

-Kaka Chen

More information about the zeromq-dev mailing list