Skip to content

feat: replace custom webtransport with upstream webtransport-go#6

Open
zsiec wants to merge 8 commits intomainfrom
quic-upgrade
Open

feat: replace custom webtransport with upstream webtransport-go#6
zsiec wants to merge 8 commits intomainfrom
quic-upgrade

Conversation

@zsiec
Copy link
Copy Markdown
Owner

@zsiec zsiec commented Mar 17, 2026

Summary

Brief description of the change.

Test Plan

  • make check passes
  • New/changed behavior is tested

Replace the custom webtransport/ package (a draft-02-only fork) with
github.com/quic-go/webtransport-go v0.10.0, which supports Application
Protocol Negotiation (draft-14+). This enables CA-signed cert connections
in production while preserving self-signed cert support for local dev.

- Upgrade quic-go v0.50.0 → v0.59.0, add webtransport-go v0.10.0
- Delete 8-file custom webtransport/ package
- Update distribution/ callers: concrete pointer types replace interfaces
- Narrow control stream to io.ReadWriter for testability
- Simplify test mock from 9 methods to 2
- Configure HTTP/3 server with ALPN and WebTransport settings
zsiec added 7 commits March 18, 2026 23:02
Replace Cubic (loss-based) with BBRv3 (delay-based) congestion
control for QUIC/WebTransport media delivery. BBRv3 detects
queueing early and smooths delivery rate, eliminating the
burst-starve pattern that caused 400-480ms jitter spikes with
Cubic over internet paths.

Fork: github.com/zsiec/quic-go v0.59.1-bbr
Spec: IETF draft-ietf-ccwg-bbr-04 (BBRv3, Oct 2025)
Enables downstream applications to accept additional bidirectional
WebTransport streams beyond the MoQ control stream. Each accepted
stream is dispatched to the callback in its own goroutine.

Follows the established OnDatagram pattern: callback field on
ServerConfig, threaded through MoQSessionConfig, accept loop
spawned alongside readControlLoop and readDatagramLoop in Run().
Allow applications to react when a MoQ viewer is added to a relay,
enabling use cases like forcing IDR keyframes for immediate decodability.
The quic-go defaults (512KB stream / 768KB connection initial flow
control windows) are too small for live video streaming. At 3Mbps a
single preview stream exhausts the window in ~2s, causing
SendStream.Write to block and triggering server-side frame drops.

Callers can now pass a custom *quic.Config via ServerConfig.QUICConfig
to set appropriate InitialStreamReceiveWindow,
InitialConnectionReceiveWindow, and max window sizes.
Log warnings when OpenUniStreamSync or WriteVideoFrame take >50ms.
Log when keyframes are dropped due to channel full (with queue depth).
This identifies whether QUIC stream creation or frame writes are the
bottleneck causing frame drops in the MoQ relay.
Change OnDatagram callback type from func(streamKey, data) to
func(streamKey, data) []byte. Non-nil return is sent back to the
originating session via SendDatagram. Enables ping/pong clock sync.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant