feat(quic): bestEffort streams + park CC plan indefinitely
After drafting the congestion-control plan we concluded the audio-rooms
workload doesn't actually need CC — speakers push ~8 KB/sec, which
never fills any modern link's capacity. The one real concern that
surfaced — STREAM retransmit wasting bandwidth on stale Opus frames
on lossy uplinks — is much cheaper to fix directly than to bound via
a 14-test CC subsystem.
SendBuffer gains a `bestEffort: Boolean = false` constructor flag.
When true, markLost drops the lost ranges instead of moving them to
the retransmit queue and lets the underlying byte storage compact as
if the bytes had been ACK'd. The FIN flag (if covered) also stays
sent — best-effort skips FIN re-emission too. The peer may end up
with a truncated stream; moq-lite's per-stream timeouts handle that.
Plumbed through QuicStream → QuicConnection.openUniStream(bestEffort)
→ QuicWebTransportSessionState.openUniStream(bestEffort) →
WebTransportSession.openUniStream(bestEffort). Default is false
everywhere, so reliable streams (HTTP/3 control, moq-lite SUBSCRIBE
bidi, etc.) keep RFC 9000 §3.5 semantics.
MoqLiteSession.openGroupStream now passes `bestEffort = true` —
group streams carry a single Opus packet, are real-time, and don't
benefit from retransmit.
Internal cleanup: `removeOverlap`'s `ackedNotLost: Boolean` parameter
became `OverlapAction { ACK, RETRANSMIT, DROP }` so the third best-
effort disposition has a name. Same code paths, same tests, just
clearer at the call site.
CC plan (quic/plans/2026-05-05-congestion-control.md) is updated to
"parked indefinitely" with a note that this commit is the lighter-
weight alternative that addresses the only practical concern. The
plan is preserved as a reference if a future workload justifies CC.
New tests: SendBufferBestEffortTest (6 cases — reliable baseline,
best-effort drops, FIN drop in best-effort mode, partial overlap,
idempotent stale loss, ACK path still works).
https://claude.ai/code/session_01PYYez8a6sjiakyjAxsfCEQ
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
# Congestion control for `:quic` — implementation plan
|
||||
|
||||
**Status:** plan, not started.
|
||||
**Status:** **parked indefinitely 2026-05-05.** After drafting this
|
||||
plan we concluded the audio-rooms workload doesn't actually need CC —
|
||||
see [Why](#why-and-why-this-is-honestly-low-priority) below. The one
|
||||
real concern that surfaced (STREAM retransmit wasting bandwidth on
|
||||
stale Opus frames) is addressed by a much smaller fix — a
|
||||
`bestEffort` flag on `SendBuffer` that drops lost ranges instead of
|
||||
retransmitting them, set by moq-lite for group streams. That
|
||||
follow-up landed on the same branch.
|
||||
|
||||
This plan is preserved as a reference if a future workload (large
|
||||
file transfer over `:quic`, multiple concurrent media streams,
|
||||
running on heavily-shared mobile uplinks with hostile routers) ever
|
||||
makes CC necessary. The architecture below is sound; we just don't
|
||||
have a problem big enough to justify the implementation cost today.
|
||||
|
||||
## Why (and why this is honestly low-priority)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user