[zeromq-dev] RPC design pattern

Brian Candler B.Candler at pobox.com
Sun Apr 18 12:11:10 CEST 2010

On Sun, Apr 18, 2010 at 02:28:04AM -0500, Joe Holloway wrote:
> I guess this is an age old problem of fault tolerant service
> discovery.   The service registry can't know whether or not a service
> is reachable until a client has tried to connect.

I am a newbie (so take what I say with a pinch of salt :-), but AFAIK one of
the features of a 0MQ socket is that if the far end is down, it will keep
trying to reconnect until it is available.  This takes place behind the

So maybe the solution is for the socket to have a list of endpoints to try,
instead of a single one?  It could just walk around the list until one
connects.  If you randomize this list first, then you get load-balancing

The API docs don't make it clear what happens if you call zmq_connect
multiple times on the same socket.


More information about the zeromq-dev mailing list