Module ping

Source
Expand description

HTTP2 Ping usage

hyper uses HTTP2 pings for two purposes:

  1. Adaptive flow control using BDP
  2. Connection keep-alive

Both cases are optional.

Β§BDP Algorithm

  1. When receiving a DATA frame, if a BDP ping isn’t outstanding: 1a. Record current time. 1b. Send a BDP ping.
  2. Increment the number of received bytes.
  3. When the BDP ping ack is received: 3a. Record duration from sent time. 3b. Merge RTT with a running average. 3c. Calculate bdp as bytes/rtt. 3d. If bdp is over 2/3 max, set new max to bdp and update windows.

StructsΒ§

Bdp πŸ”’
Config πŸ”’
KeepAlive πŸ”’
KeepAliveTimedOut πŸ”’
Ponger πŸ”’
Recorder πŸ”’
Shared πŸ”’

EnumsΒ§

KeepAliveState πŸ”’
Ponged πŸ”’

ConstantsΒ§

BDP_LIMIT πŸ”’
Any higher than this likely will be hitting the TCP flow control.

FunctionsΒ§

channel πŸ”’
disabled πŸ”’
seconds πŸ”’

Type AliasesΒ§

WindowSize πŸ”’