First cut implementation of hybrid slow start
Hybrid Slow Start was introduced by Sangtae Ha and Injong Rhee in "Hybrid slow start for high-bandwidth and long-distance networks" in 2008. An extended version is available at: https://pdfs.semanticscholar.org/7f9a/d9212ccb9ab9b5614bef93347a4b05266a77.pdf
It is essentially just the combination of 2 heuristics for when to exit slow start before encountering loss or reaching ssthresh:
- find the minimum RTT in the initial ACK train of HYSTART_MIN_SAMPLES, if the minimum RTT from the sample period is greater than the minimum RTT so far + some threshold value of the minRTT, exit slow start
- if the time since the last ack is <= hystart_ack_delta (2ms by default) and the time since the start of the packet train is greater than the minimum measure RTT / 16 exit slow start