[zeromq-dev] does 0mq keep-alive for connections?

Ivan Pechorin ivan.pechorin at gmail.com
Mon Jan 23 20:02:26 CET 2012


2012/1/23 Martin Sustrik <sustrik at 250bpm.com>:
> On 22/01/12 13:02, Sergey Matveychuk wrote:
>
>> I think the patch will resolve my problem.
>
> Are you sure about that?
>
> First, keepalives are meant for the situation where the network
> connectivity between peers is broken (cable pulled out from the socket,
> switch turned off etc.) Is that your use case?

Some VPN boxes are configured to close idle sessions after some
timeout. Some firewalls are configured to drop idle connections
("idle" connection here means no traffic passes through it). For
instance, if I remember correctly, in popular Cisco ASA firewalls the
idle timeout is set to 30 minutes by default.

Enabling TCP keepalives with reasonable TCP_KEEPIDLE (like 5 or 15
min) and TCP_KEEPINTVL usually solves this issue.


> Moreover, TCP keep-alive interval is set to 2 hours or more (see RFC
> 1122). Is that sufficient for you?

TCP_KEEPIDLE and TCP_KEEPINTVL should be set to something smaller than
the default idle timeout in firewalls.



More information about the zeromq-dev mailing list