[zeromq-dev] Ping Pong Heartbeats & Quick Server Restart Issue

Russell Della Rosa rdellar2000-zeromq at yahoo.com
Mon Mar 23 18:28:07 CET 2015


Hrmm...  Thinking through this.

I originally didn't think the UUID method would work because I was considering
what would happen if I ever supported load balancing (i.e.  Multiple primaries
/ multiple secondaries.) 

But I'm not doing that currently, so there should only be a primary and
secondary server.  Each of which is fronted by a ROUTER which could have its
own UUID.  So I think this would work.


...I still wish there was a way to do this with pure socket patterns, but maybe
that isn't possible.  (Seems very similar to what a router does, in reverse...)


________________________________
From: Stephen Lord <Steve.Lord at quantum.com>
To: ZeroMQ development list <zeromq-dev at lists.zeromq.org> 
Sent: Monday, March 23, 2015 10:50 AM
Subject: Re: [zeromq-dev] Ping Pong Heartbeats & Quick Server Restart Issue



Have the heartbeat reply include a guid which represents the instance of the server, the server picks a guid at startup and always uses it. If the client sees two different guids then it knows the server restarted and can take action. The server side state is minimal, the client needs to track the guids it gets back on a per server basis.



>
>
>On Mar 23, 2015, at 9:39 AM, Russell Della Rosa <rdellar2000-zeromq at yahoo.com> wrote:
>
>I'm doing this using JeroMq (may use jzmq at some point) so I'm at the mercy of the JVM.
>
>
>I have a wrapper around the JVM that heartbeats also, it and will kill the JVM if it doesn't reply with a pong.  After the wrapper kills the JVM, it will quickly restart the JVM so I'm not sure there is a good point to send this shutdown message.  (The wrapper might be able to but I think that might get complex.)
>
>
>I like this idea though since it keeps the server stateless.
>
>
>________________________________
> From: Justin Karneges <justin at affinix.com>
>To: zeromq-dev at lists.zeromq.org 
>Sent: Friday, March 20, 2015 2:41 PM
>Subject: Re: [zeromq-dev] Ping Pong Heartbeats & Quick Server Restart Issue
>
>
>> I'm curious if anyone has solved this quick server restart problem in a
>> clean way with socket patterns?  Or if you have other suggestions?  Or if
>> you have example code of ping/pong handling this case I'd love to see it.
>
>I suggest having the server send some kind of shutdown message. This is
>basically the same as how regular TCP connection loss is indicated,
>except that you have to do it yourself rather than the OS doing it for 
>
>
>
>
>you.
>
>Of course, the advantage of the OS doing it for you is that you can
>ensure a close packet is sent even if your process crashes. This may bit
>a bit harder to do with ZeroMQ, depending on the language.
>_______________________________________________
>zeromq-dev mailing list
>zeromq-dev at lists.zeromq.org
>http://lists.zeromq.org/mailman/listinfo/zeromq-dev 
>
>
>
>
_______________________________________________
>zeromq-dev mailing list
>zeromq-dev at lists.zeromq.org
>https://urldefense.proofpoint.com/v1/url?u=http://lists.zeromq.org/mailman/listinfo/zeromq-dev&k=8F5TVnBDKF32UabxXsxZiA%3D%3D%0A&r=3Cz4BWxkuioYQ%2BdxY62EqptPwDeTj3M%2B5v06yEnFWTY%3D%0A&m=7MAl5btFQ60vHCXT9uKH65obPguN3ihVUEVTNwTJvzY%3D%0A&s=caf963151a45847acc3cf01940a6b42b97590128726ebbf7e0ef3af7f0b78330
>

________________________________
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.


_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list