[PATCH 2 of 5] QUIC: eliminated spurious recovery period

Sergey Kandaurov pluknet at nginx.com
Sat Aug 12 13:28:06 UTC 2023


> On 1 Aug 2023, at 11:45, Roman Arutyunyan <arut at nginx.com> wrote:
> 
> # HG changeset patch
> # User Roman Arutyunyan <arut at nginx.com>
> # Date 1690874486 -14400
> #      Tue Aug 01 11:21:26 2023 +0400
> # Node ID a53bbd94a0fa436535ee3bbcb6176befdf47c68a
> # Parent  5b91a40f2dd249000e9208a0152dc5cc0c6ea0c4
> QUIC: eliminated spurious recovery period.
> 
> The initial value for recovery_start used to be the current time.  As a result,
> the packets sent at the very beginning of a connection belonged to a recovery
> period and their ACKs were treated accordingly. The issue manifested itself with
> "quic congestion ack recovery" log messages and slower growth of congestion
> window.  Now the initial value for recovery_start is set to an earlier time,
> which fixes the spurious recovery period.
> 
> diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c
> --- a/src/event/quic/ngx_event_quic.c
> +++ b/src/event/quic/ngx_event_quic.c
> @@ -315,7 +315,7 @@ ngx_quic_new_connection(ngx_connection_t
>                                     ngx_max(2 * qc->tp.max_udp_payload_size,
>                                             14720));
>     qc->congestion.ssthresh = (size_t) -1;
> -    qc->congestion.recovery_start = ngx_current_msec;
> +    qc->congestion.recovery_start = ngx_current_msec - 1;
> 
>     if (pkt->validated && pkt->retried) {
>         qc->tp.retry_scid.len = pkt->dcid.len;

This also needs to be adjusted for a new path and
when entering persistent congestion, per 9002, fig.1.
The former can be seen with quic_migration.t.

-- 
Sergey Kandaurov


More information about the nginx-devel mailing list