Imported from previous forum
Hello, all
As we can see in manuals (FIX 4.4) before sending Logout message server should wait HeartBtInt + “some reasonable transmission time”, transmit TestRequest message, wait also HeartBtInt + “some reasonable transmission time” and after that if no message was received session should be stopped.
So, what should server do, if client (i.e. session initiator) wishes to set heartbeat interval less than “some reasonable transmission time”? Should server transmit Heartbeat messages (or something else) in this time period? Or maybe it’s no neccessary?
PS. “some reasonable transmission time” = 12 seconds (in my project), is it too large?
Thanks for any help.
Regards,
Nikita
[ original email was from John Prewett - jprewett@lavatrading.com ]
Hi,
You should always send out a heartbeat at the appropriate moment, irrespective of whether the other end is currently in some problematic state (but still connected).
If you perceive an initiator is connecting to you with an absurdly low heartbeat interval, I would recommend terminating the session in an appropriate manner, shortly after receipt of their Logon message and initiating human contact with this client to indicate the nature of the problem.
Thirdly, you have hardcoded a value (12) for “some reasonable transmission time”. I would recommend against this. I use a configurable percentage of the agreed heartbeat interval. Typically, because I tend to be lenient, that tends to be 100% of the heartbeat interval. The reason I am lenient is that I have found that some problematic customer applications “go to sleep” at inconvenient moments but are not actually dead. Forcing a disconnect is a drastic step, invoking recovery on both sides. Often the problematic customer application is even less good at recovery than it was at heartbeating, so I view disconnection as the absolute last resort. In most trading applications, the messages (example: executions) are going to HAVE to be delivered eventually anyway, so a disconnection (if the application is sleeping and not dead) only serves to delay that goal.
I hope this helps.
JohnP
Thanks!
Hi,
You should always send out a heartbeat at the appropriate moment,
irrespective of whether the other end is currently in some problematic
state (but still connected).If you perceive an initiator is connecting to you with an absurdly low
heartbeat interval, I would recommend terminating the session in an
appropriate manner, shortly after receipt of their Logon message and
initiating human contact with this client to indicate the nature of
the problem.Thirdly, you have hardcoded a value (12) for “some reasonable
transmission time”. I would recommend against this. I use a configurable
percentage of the agreed heartbeat interval. Typically, because I tend
to be lenient, that tends to be 100% of the heartbeat interval. The
reason I am lenient is that I have found that some problematic customer
applications “go to sleep” at inconvenient moments but are not actually
dead. Forcing a disconnect is a drastic step, invoking recovery on both
sides. Often the problematic customer application is even less good at
recovery than it was at heartbeating, so I view disconnection as the
absolute last resort. In most trading applications, the messages
(example: executions) are going to HAVE to be delivered eventually
anyway, so a disconnection (if the application is sleeping and not dead)
only serves to delay that goal.I hope this helps.
JohnP