Skip to content

xds-client: allow configuring ADS message size limits - #2875

Merged
YutaoMa merged 2 commits into
masterfrom
ankmittal/xds-client-message-size
Sep 22, 2026
Merged

YutaoMa merged 2 commits into
masterfrom
ankmittal/xds-client-message-size

Conversation

@ankurmittal

Copy link
Copy Markdown
Contributor

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_size and with_max_encoding_message_size to
TonicTransportBuilder, forwarding to the underlying Grpc client. Both are
unset 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 warnings are green for xds-client.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 18, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ankurmittal / name: Ankur Mittal (162e730)

@ankurmittal
ankurmittal force-pushed the ankmittal/xds-client-message-size branch from 5871831 to 162e730 Compare September 18, 2026 09:11
@ankurmittal
ankurmittal requested a review from YutaoMa September 18, 2026 09:16
@ankurmittal
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
ankurmittal force-pushed the ankmittal/xds-client-message-size branch from 162e730 to 1521922 Compare September 21, 2026 18:43

@YutaoMa YutaoMa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YutaoMa
YutaoMa enabled auto-merge (squash) September 22, 2026 16:56
@YutaoMa
YutaoMa merged commit eeafd54 into master Sep 22, 2026
54 checks passed
@YutaoMa
YutaoMa deleted the ankmittal/xds-client-message-size branch September 22, 2026 17:15
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`.
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.

2 participants