[zeromq-dev] RPC design pattern

Martin Sustrik sustrik at 250bpm.com
Mon Apr 19 11:01:24 CEST 2010


> I see - so rather than connecting to one of the endpoints, it connects to
> all of them simultaneously. Thanks.
> I think there's a use case for the other model too. For very large numbers
> of clients (N) and servers (M) it could scale better if each client picked
> one endpoint.  Each server would only have to handle N/M connections on
> average.

Yes. This can be achieved in two ways:

1. On top of 0MQ. Each client simply chooses a random server to connect to.

2. Using a shared queue. All clients connect to the queue. All servers 
connect to the queue. Queue manages fair load-balancing of client 
requests among the servers.


More information about the zeromq-dev mailing list