[zeromq-dev] detecting disconnections
Yi Ding
yi.s.ding at gmail.com
Wed Jan 11 21:43:24 CET 2012
On Tue, Jan 10, 2012 at 11:55 PM, Attila-Mihaly Balazs <
x_at_y_or_z at yahoo.com> wrote:
> +1 for bi-directional heartbeating. Real-life networks can have all kinds
> of weird situations like silently dropping packets in one direction or
> half-open connections [1] which can only be detected by heartbeating. Of
> course messages received should count as heartbeats for efficiency.
>
> Regards,
> Attila Balazs
>
> PS. Even more precisely any partial message read should count as a
> heartbeat, otherwise reading large messages can cause a disconnect on an
> otherwise clearly healthy connection.
>
> [1] http://www.evanjones.ca/tcp-stuck-connection-mystery.html
>
> By experience, heartbeating should happen every 2-5 seconds. Ymmv.
>
> Thanks. I will definitely implement heartbeating. If we do it every 2-5
seconds, it may be sufficient for now, and I can look at the disconnect
logic later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120111/1c1999ce/attachment.htm>
More information about the zeromq-dev
mailing list