Package io.github.mahmoudimus.quic.congestion


package io.github.mahmoudimus.quic.congestion
Congestion control for QUIC (RFC 9002 section 7), ported from quinn-proto's congestion module: the Controller interface, NewReno (RFC 9002), Cubic (RFC 9438, the default, as in quinn), the experimental Bbr (quinn's BBRv1-style port) and the RttEstimator they read.

All times are nanoseconds from the connection's monotonic clock, passed in by the caller. Controllers are not thread-safe and take no locks: each belongs to one connection, which serializes access; configurations are immutable and shared.

  • Class
    Description
    A BBR congestion controller, experimental as in quinn: it models the path's bottleneck bandwidth and minimum RTT instead of reacting to loss, aiming at less buffer bloat and better throughput on paths with a high bandwidth-delay product. quinn's port, which this follows, is based on a BBRv1 sender (bbr_sender.cc) and draft-cardwell-iccrg-bbr-congestion-control.
    BBR's modes.
    Configuration of the Bbr controller.
    A congestion controller (RFC 9002 section 7): decides how many ack-eliciting bytes may be in flight.
    Builds congestion controllers, one per path.
    Congestion controller metrics.
    The CUBIC congestion controller (RFC 9438), counting the window in bytes: slow start, then the cubic window function W_cubic(t) = C * (t - K)^3 + W_max with the Reno-friendly estimate W_est, fast convergence, and a multiplicative decrease of beta_cubic = 0.7.
    Configuration of the Cubic controller.
    The NewReno congestion controller of RFC 9002 section 7: slow start, then congestion avoidance growing the window by one datagram per window acknowledged (Appropriate Byte Counting, RFC 3465), and a multiplicative decrease once per recovery period.
    Configuration of the NewReno controller.
    A delivery rate sample (draft-cheng-iccrg-delivery-rate-estimation), taken when an ACK acknowledges packets that were in flight.
    Round-trip time estimation for one network path (RFC 9002 section 5): the latest sample, the smoothed RTT and its variance (RFC 6298), and the minimum RTT.