enhancement(vector source, vector sink): enable HTTP/2 adaptive flow-control windows#25782
Open
Evador wants to merge 1 commit into
Open
enhancement(vector source, vector sink): enable HTTP/2 adaptive flow-control windows#25782Evador wants to merge 1 commit into
Evador wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
This comment has been minimized.
This comment has been minimized.
Author
|
I have read the CLA Document and I hereby sign the CLA |
e39272d to
dfb3690
Compare
Author
|
Results from my production setup: |
Author
|
Opened #25792 with the full analysis. @vectordotdev/vector ready for a look — happy to switch to a config option instead of always-on adaptive windows if that's preferred. |
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
Enables HTTP/2 adaptive flow-control windows on the
vectorsink's hyper client and on the shared gRPC server builder used by thevectorsource.Today neither peer sets any window options, so both run with the RFC 7540 default 65,535-byte stream/connection windows. With
acknowledgementsenabled the server only completes aPushEventsrequest (and the client only gets its WINDOW_UPDATE credit back) after the events have been accepted by the downstream components, so a single vector-to-vector connection is capped at roughly64 KiB / (network RTT + ack latency)no matter howbatch.*orrequest.concurrencyare tuned.We hit this in production on 0.44.0: a single connection between an agent and an aggregator plateaus at ~5 MB/s of event bytes (~7k events/s at our event sizes) on a 2 ms LAN, with CPU nearly idle on both ends. The client builder is unchanged on master (
src/sinks/vector/config.rs,hyper::Client::builder().http2_only(true)), same for the server side, so the cap should reproduce on any recent version.Evidence that it's flow control and not processing:
batch.max_bytes(4 MiB -> 8 MiB) exactly doubled per-request latency, throughput unchangedrequest.concurrency1 vs 8 vs 32 made no difference over the LAN (all requests share one connection window)request.concurrency: 8then does help (163k events/s) — so the server pipeline itself is nowhere near the limit, the window pacing over a real network isLetting hyper/tonic size the windows from the observed bandwidth-delay product (
http2_adaptive_window) removes the ceiling without adding a config knob.Vector configuration
Producer:
Aggregator:
(Production topology has a remap + route fan-out into multiple file sinks with disk buffers behind the source; the plateau is the same, the ack latency is just a bit longer.)
How did you test this PR?
cargo check --no-default-features --features "sources-vector,sinks-vector"passes on this branch; the change only touches the two transport builders.Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
None — happy to open an issue with the full analysis first if that's preferred.