feat(quic): per-algorithm congestion-control tuning#47
Merged
Conversation
Thread a backend-neutral `CongestionTuning` through `TransportConfig` so each QUIC backend can apply per-algorithm knobs, instead of only selecting an algorithm name. - tokio-quiche patch: add `enable_cubic_idle_restart_fix` and a `BbrParamsField` (`Option<quiche::BbrParams>`) to `QuicSettings`, applied in `make_quiche_config`. The latter wraps the quiche type in a newtype because the `#[settings]` macro requires every field to impl `Settings` (which `quiche::BbrParams` does not). Guard the `set_custom_bbr_params` call behind `quiche_internal`. - wind-quic: add a serde-able, backend-neutral `Bbr2gcConfig` (the full experimental quiche `BbrParams` surface), `BbrBwLoReductionStrategy`, and a `CongestionTuning` aggregate (initial cwnd packets, pacing, max pacing rate, HyStart++, CUBIC idle-restart-fix, BBR params) on `TransportConfig`. Map them onto `QuicSettings` in the quiche backend (converting the neutral BBR config to `quiche::BbrParams`). Enable the tokio-quiche `quiche_internal` feature. - wind-tuic: carry `CongestionTuning` on the quiche `ConnectionOpts` (passed through `to_transport`) and add `newreno_loss_reduction_factor` to the quinn inbound opts; re-export the neutral config types. These are consumed by the breeze tuic-server's new `[backend.<b>.cc]` config sections. No behavior change for existing callers: every new knob is optional and defaults to leaving the backend default in place. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9e7040b to
7f57eb9
Compare
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Today each backend only exposes a congestion-control algorithm name. This PR threads a backend-neutral
CongestionTuningthroughTransportConfigso each backend can apply per-algorithm knobs, surfacing quiche's flow-control / CC tuning (including the full experimental BBR parameter set) and quinn's NewReno loss factor.These types back the breeze tuic-server's new
[backend.<backend>.cc]config sections (algo+ per-algorithm sub-tables).What's added
patches/tokio-quicheQuicSettings: newenable_cubic_idle_restart_fix: boolandcustom_bbr_params: BbrParamsField, applied inmake_quiche_config.BbrParamsFieldis a thin newtype overOption<quiche::BbrParams>— the#[settings]macro requires every field to implSettings, whichquiche::BbrParamsdoesn't (no serde), so the wrapper supplies trivial impls (the field is#[serde(skip)]).set_custom_bbr_paramsis gated behind quiche'sinternalfeature; the call is guarded by#[cfg(feature = "quiche_internal")].wind-quicBbr2gcConfig(full ~26-field quicheBbrParamssurface) +BbrBwLoReductionStrategy.CongestionTuningaggregate (initial cwnd packets, pacing, max pacing rate, HyStart++, CUBIC idle-restart-fix, BBR params) added toTransportConfig.QuicSettings(converting the neutral BBR config toquiche::BbrParams).quiche_internalfeature soset_custom_bbr_paramsis available.wind-tuicConnectionOptscarriesCongestionTuning(passed throughto_transport).newreno_loss_reduction_factor.Compatibility
No behavior change for existing callers: every new knob is
Option-typed and defaults to leaving the backend default in place. The vendoredcrates/tuic-serveradapter is updated for the newConnectionOptsfield (cc: Default::default()).Test plan
cargo check -p tuic-server --features quiche --all-targets(wind workspace) — green.cargo clippy -p wind-quic -p wind-tuic --features wind-tuic/quiche,wind-tuic/server— clean.cargo treeconfirmsquiche_internalis enabled on the resolvedtokio-quiche, soset_custom_bbr_paramsis compiled in.🤖 Generated with Claude Code