Re: [Quickfix-users] TCP/IP Connection drops
Brought to you by:
orenmnero
From: Joerg T. <Joe...@ma...> - 2003-10-31 10:21:05
|
Hi Nikhil, > What is the general experience regarding TCP connections being dropped > from time to time, especially when connecting across the Pacific to > South Korea, for instance? In other words, if you using a regular > Internet connection to connect to a FIX counterparty, does the FIX > engine have to reconnect periodically due to a dropped connection? Yes, this may happen. Either the TCP/IP notices the connection drop, then you get disconnected immediately. Or a Heartbeat timeout occurs: If the counterparty does not send message for a distinct period of time (heartbeat interval), it should at least send a heartbeat. If QuickFIX does not get any message (or heartbeat) for some time, it sends an explicit TestRequest(SOME_TAG) which has to be answered by a Heartbeat(SOME_TAG). If the counterparty fails to answer, the connection is regarded as dead and QuickFIX drops the connection. On reconnect, the sequence numbers are checked and missing message will be resent. > If so, what is average time period between reconnects? For initiators (clients), you can set 3 configuration variables: ReconnectInterval - Time between reconnection attempts in seconds. HeartBtInt - Heartbeat interval in seconds. LogonTimeout - Number of seconds to wait for a logon response before disconnecting. The first applies only if a disconnect has been detected and the initiator tries to reconnect. The HeartBtInt is set by the initiator, but applies for both sides: If QuickFIX gets for 1.2*HeartBtInt seconds no messages from the other side, it sends a TestRequest. Then it waits another 1.2*HeartBtInt seconds. If no answer has arrived, it disconnects. The LogonTimeout is just for logging in if the other side does not answer (for several reasons: sequence number too low, wrong SenderCompID etc.). In summary, if your connection breaks, you need between 1.2*HeartBtInt and 2.4*HeartBtInt seconds to detect that and another ReconnectInterval seconds to reconnect. Hope that helps, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |