Expand description
HTTP2 Ping usage
hyper uses HTTP2 pings for two purposes:
- Adaptive flow control using BDP
- Connection keep-alive
Both cases are optional.
Β§BDP Algorithm
- When receiving a DATA frame, if a BDP ping isnβt outstanding: 1a. Record current time. 1b. Send a BDP ping.
- Increment the number of received bytes.
- 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Β§
EnumsΒ§
- Keep
Alive πState - Ponged π
ConstantsΒ§
- BDP_
LIMIT π - Any higher than this likely will be hitting the TCP flow control.
FunctionsΒ§
Type AliasesΒ§
- Window
Size π