[zeromq-dev] Forwarder stops forwarding

Pieter Hintjens ph at imatix.com
Wed Jun 16 00:28:15 CEST 2010

On Wed, Jun 16, 2010 at 12:12 AM, Matt Weinstein
<matt_weinstein at yahoo.com> wrote:

> Use a one-way keep-alive (rather than a round-trip heartbeat) and make
> it adaptive. Each side would just look at their average sends per
> second, and maintain a fraction of that rate.  It would be easy to
> measure the rate by sampling a counter...

In fact if one party is sending messages, it does not need to send
heartbeats (messages count as "alive").  So a plausible solution is
that each peer sends heartbeats only when it's not sending messages,
and it does this at a rate that matches the previous message rate
(maybe 1% of it), slowing down in a curve.  The recipient can detect a
dead peer by seeing a sudden fall to zero in incoming messages, rather
than a slope.


More information about the zeromq-dev mailing list