[zeromq-dev] Load distribution vs fail over

gonzalo diethelm gdiethelm at dcv.cl
Fri Mar 5 15:23:03 CET 2010


Hi Martin,

> Yes. You are right. The feature you are describing is absolutely
needed.
> It's on the roadmap, but as always, the share amount of stuff on the
> roadmap... Anyway, here are my comments:

It is great to see one is not alone and thinking of weird, useless
ideas... Thanks for validating my musings!

> Failover as described in your scenario (but needed in other scenarios
as
> well - just think of multihoming) should be available for both
> UPSTREAM/DOWNSTEAM and REQ/REP sockets.
> 
> It should kick in if primary service is disconnected, dead or busy.
> 
> Once the primary service is ready to process messages the system
should
> fail back automatically.
> 
> The user should be able to combine failover with load balancing. I.e.
> load balance among instances R1..R10. When none is available, fail
over
> to R11.
> 
> There should be multiple failover levels: If R1 is not available fail
> over to R2. If even R2 is not available fail over to R3.

You captured all my requirements, and then some. I was starting small,
but everything you mention is, of course, desirable.

> The current idea is to introduce ZMQ_PRIORITY socket option:
> 
> socket_t s (ctx, ZMQ_DOWNSTREAM);
> s.setsockopt (ZMQ_PRIORITY, 1);
> s.bind ("tcp://eth0:5555");
> s.setsockopt (ZMQ_PRIORITY, 2);
> s.bind ("tcp://eth0:5556");
> 
> This way load balancing would be done among all the peers connected to
> port 5555. If none of them is available, the system will fail over to
> peers connected to port 5556 and load balance among them.
> 
> One of the important applications of such mechanism is using local
> instances (say those located in the same datacenter) if possible and
> failing over to remote instances (say those located in a distant
> datacenter connected by slow satellite link) in case no local services
> are available.

This would be perfect.

> As for the condition for fail-over, queue limits (ZMQ_HWM) should be
> used. These still weren't ported from 0MQ/1.0, but as I am said the

code
> is ready and will be commited shortly.

Ok, knowing this is on the pipeline is great. Thank you very much.

-- 
Gonzalo Diethelm



----------------------------------------- 
Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena. 
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje. 

"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law. 
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message. 




More information about the zeromq-dev mailing list