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

Roman Arutyunyan arut at nginx.com
Tue Aug 1 07:45:13 UTC 2023


# 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;


More information about the nginx-devel mailing list