Subject: A question on Heatbeats

From: Ilknur Aydin <[email-masked]>
Date: Thu, 18 Mar 2004 14:38:42 -0500 (EST)

Hello,

I am implementing SCTP in Qualnet (version 3.6.1).

I have some doubts about the implementation of the heartbeat(HB)
mechanism.

In my code, I have one HB timer per destination. I set the value of each
HB timer to

rto + HB.interval*(1 + random number betw. -0.5 to 0.5)

*) I follow the suggestion in the RFC and whenever a HB timer expires, I
- increment the error count of the corresponding destination by one,
- I send a HB,
- and re-schedule a new HB by using the formula above.

*) Whenever a SACK (acking new data to the dest.) or a HB-ACK is received I
- clear the (corresponding) error counts,

*) Whenever a new data chunk is sent (or a new HB by the ULP), I
- reset the value of the HB timer using the formula above

I am not sure though, if I gurantee the following three points in my
implementation:

1) a HB is sent ONLY to the IDLE destinations

2) a HB is sent EVERY HB interval to the (idle) destinations

3) most importantly,

"...Only one heartbeat
   should be sent each time the heartbeat timer expires (if multiple
   destinations are idle).  It is a implementation decision on how to
   choose which of the candidate idle destinations to heartbeat to (if
   more than one destination is idle)." -- pg. 95. parag 3 of the RFC
(I am confused with the last one, is this about when you want to use a
SINGLE HB timer per association ?)

Any help/explanation would be appriciated.

Ilknur Aydin, Ph.D. Student
Department of Computer & Info. Sciences
University of Delaware
Newark, DE 19716 USA
http://www.cis.udel.edu/~aydin

---

From: Ilknur Aydin <[email-masked]>
Date: Fri, 19 Mar 2004 12:12:36 -0500 (EST)

Hi Ivan,

Thanks for your reply.

Actually, when I am trying to figure out how to implement HB mechanism, in
addition to the RFC, I also look at the SCTP book (by R. Stewart and Q.
Xie).

Section 7.2.3.2.2 (page 211) of the book mentions about the timing for HB
chunks. The section mentions implementing both (1)per destination and (2)
per association (a simplified approach) HB timers and says that
simplified approach would not be "ideal". Hence, I finally decided to go
with per destination HB timers to be more precise.

> 	The point is that you shouldn't have more than one HB in flight at
> the same time. I mean, you send one HB to one destination and wait till
> the timer expires. You can only send a new HB after that timer expires,
> never before. And if when the timer expires the HB ACK has not arrived
> yet, then you increase the retransmission counter and so on.

I think, you should not have more than one HB in flight to a specific
destination address and should try NOT to create a burst of HB traffic to
the receiving host.  But, if you are using per destination HB timers, you
"might" end up having more than one HB in flight to the (different
destination addresses of) the receiving host, even though you introduce
jitter.

> 	In fact the HB timer is more like the "time during which you are
> not allowed to send a HB"....

Again, I am thinking that this is "...to a specific destination address",
not "...to the receiving host."

> Once it expires, you can send a new one to
> any of the idle addresses (if there is really any such one). That means
> that you don't need more than one HB timer per association.

Regards,
ilknur

>
> > -----Original Message-----
> > From: ext Ilknur Aydin [mailto:[email-masked]]
> > Sent: 18 March, 2004 21:39
> > To: [email-masked]
> > Subject: A question on Heatbeats
> >
> >
> > Hello,
> >