Configurable pacing rate modes via TransportConfig#2543
Open
stablebits wants to merge 1 commit intoquinn-rs:mainfrom
Open
Configurable pacing rate modes via TransportConfig#2543stablebits wants to merge 1 commit intoquinn-rs:mainfrom
stablebits wants to merge 1 commit intoquinn-rs:mainfrom
Conversation
Add PacingRateMode enum to control rate calculation: - RttDependent: rate = cwnd × 1.25 / RTT (default, standard QUIC) - Fixed: constant bytes/sec rate, ignoring RTT and cwnd - RttDependentWithFloor: max(floor, cwnd × 1.25 / RTT) Fixed and RttDependentWithFloor are useful for latency-sensitive high-RTT connections. With default Quinn's RTT-dependent pacing, cwnd bytes worth of traffic are spread over 80% of the RTT window. This approach doesn't impact overall throughput for large downloads, but it does impact latency. For example, given two connections with RTT of 10ms and 100ms sending 128 transactions, and assuming both congestion and flow control allow this in 1 RTT, it will take 13ms and 130ms (50ms one-way plus 80ms pacing) respectively for these clients to deliver the same data. High-RTT clients are penalized twice: once by RTT, and again by the slower pacing rate.
096c49c to
bed3c81
Compare
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.
Add
PacingRateModeenum to control rate calculation:RttDependent: rate = cwnd × 1.25 / RTT (default, standard QUIC)Fixed: constant bytes/sec rate, ignoring RTT and cwndRttDependentWithFloor: max(floor, cwnd × 1.25 / RTT)FixedandRttDependentWithFloorare useful for latency-sensitive high-RTT connections.With default Quinn's RTT-dependent pacing, cwnd bytes worth of traffic are spread over 80% of the RTT window. This approach doesn't impact overall throughput for large downloads, but it does impact latency. For example, given two connections with RTT of 10ms and 100ms sending 128K of data, and assuming both congestion and flow control allow this in 1 RTT, it will take 13ms (5ms one-way + 8ms pacing) and 130ms (50ms one-way + 80ms pacing) respectively until the last byte is delivered to the server. High-RTT clients are penalized twice: once by RTT, and again by the slower pacing rate.
With fixed-rate pacing (Fixed(rate)), both connections use the same pacing rate, so the delivery spread is independent of RTT.