xds-client: allow configuring ADS message size limits - #2875
Merged
Merged
Conversation
|
|
ankurmittal
force-pushed
the
ankmittal/xds-client-message-size
branch
from
September 18, 2026 09:11
5871831 to
162e730
Compare
ankurmittal
marked this pull request as ready for review
September 21, 2026 18:21
The ADS stream used tonic's defaults, capping a decoded response at 4 MiB with no way to raise it. A control plane serving a large resource set exceeds that, which fails the stream and triggers a reconnect. Add with_max_decoding_message_size and with_max_encoding_message_size to TonicTransportBuilder, forwarding to the underlying Grpc client.
ankurmittal
force-pushed
the
ankmittal/xds-client-message-size
branch
from
September 21, 2026 18:43
162e730 to
1521922
Compare
YutaoMa
enabled auto-merge (squash)
September 22, 2026 16:56
YutaoMa
added a commit
that referenced
this pull request
Sep 22, 2026
## Motivation Previously xds-client ADS message size limit options are added in #2875, but not exposed through `tonic-xds`. ## Solution This commit exposes ADS message size limits through `XdsChannelConfig` in `tonic-xds`.
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.
Motivation
The ADS stream runs with tonic's default message size limits, so a decoded
response is capped at 4 MiB and there is no way to raise it. A control plane
serving a large resource set exceeds that, failing the stream and forcing a
reconnect that hits the same limit again.
Solution
Add
with_max_decoding_message_sizeandwith_max_encoding_message_sizetoTonicTransportBuilder, forwarding to the underlyingGrpcclient. Both areunset by default, leaving tonic's behaviour unchanged.
Testing Done
New tests assert that an oversized response fails at the default limit and
succeeds once the limit is raised.
cargo test, clippy, fmt and rustdoc-D warningsare green forxds-client.