[zeromq-dev] Forwarder stops forwarding

Matt Weinstein matt_weinstein at yahoo.com
Tue Jun 15 16:17:45 CEST 2010

On Jun 15, 2010, at 9:39 AM, Martin Sustrik wrote:

> Hi Robin,
>> I think we've figured out how this happens, and I don't think its
>> specific to the forwarder.
>> The exact setup is zmq_forwarder A connecting to zmq_forwarder B,
>> which is binding. The messages are forwarded in the reverse direction
>> i.e. messages are forwarded from B to A. This is done because of
>> firewall restrictions. When there is a network interruption the
>> server (B) detects it and drops the connection however forwarder A
>> never realizes this since the connection isn't shut down cleanly
>> since the host B is on is unreachable.
>> Netstat confirms that forwarder A still believes its connected to B,
>> but B does not see the connection. In fact you can restart forwarder
>> B many hours after the network disconnect and forwarder A still
>> believes its connected. I'm guessing the issue is that since there is
>> no messages flowing from A to B writes never fail so A never realizes
>> it has been disconnected. I'm somewhat surprised by this, I thought
>> TCP would be able to figure out a connection was disconnected after a
>> minute or 2 on both client and server. Any TCP  experts that can
>> confirm that this behavior is expected?
> Yes. This is exactly how TCP behaves.
> What has to be done is implementing heartbeats on 0MQ level.
> Btw, a survey: What's the timeout you would be willing to accept to
> assert the connection is dead?

It depends.

Brocades and such consider trunking down (default) at 3 seconds, which  
I think is a very outside number, but good for human i/o.  My  
application requires <100ms response times. I'm going to be inserting  
keep-alives as required at 10 ms, connections will be marked down and  
failed over after 20 ms of silence (two cycles).

Should there be a more general QoS framework?

> Martin
> _______________________________________________
> 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