Skip to content

feat(tonic-xds): parse A32 circuit breaking config#2700

Open
mingley wants to merge 2 commits into
grpc:masterfrom
mingley:mingley/a32-circuit-breaking-scaffold
Open

feat(tonic-xds): parse A32 circuit breaking config#2700
mingley wants to merge 2 commits into
grpc:masterfrom
mingley:mingley/a32-circuit-breaking-scaffold

Conversation

@mingley

@mingley mingley commented Jun 23, 2026

Copy link
Copy Markdown

Motivation

This is the first scaffold PR for gRFC A32 circuit breaking under #2444. It starts carrying the CDS circuit_breakers.thresholds[].max_requests value through the validated ClusterResource without changing request routing or load-balancing behavior yet.

Solution

Adds a small CircuitBreakingConfig resource helper that:

  • defaults max_requests to 1024 when CDS circuit breakers are absent or no DEFAULT threshold is configured
  • selects the first RoutingPriority::Default threshold, matching Envoy/gRFC behavior
  • parses only max_requests; all other circuit-breaker fields remain ignored for this scaffold

Enforcement is intentionally left to a follow-up PR so permit lifetime can be handled correctly for streaming RPC response bodies.

Testing Done

  • cargo fmt --all --check
  • cargo test -p tonic-xds xds::resource
  • cargo check -p tonic-xds --all-features

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

@mingley mingley force-pushed the mingley/a32-circuit-breaking-scaffold branch from 7ead3cd to c6de02c Compare June 23, 2026 21:59
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
@mingley mingley force-pushed the mingley/a32-circuit-breaking-scaffold branch from c6de02c to 10e741c Compare June 23, 2026 21:59
@YutaoMa

YutaoMa commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Same comment as in #2701, let's avoid validating config end to end until the feature support is added: you can do this either by detaching the wiring from Cluster config layer, or implement logic first and then come back to this PR.

@mingley mingley force-pushed the mingley/a32-circuit-breaking-scaffold branch from 543ca6a to 8e5ba25 Compare June 25, 2026 19:26
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
@mingley mingley force-pushed the mingley/a32-circuit-breaking-scaffold branch from 8e5ba25 to 9afebba Compare June 25, 2026 19:28
@mingley

mingley commented Jun 25, 2026

Copy link
Copy Markdown
Author

Same comment as in #2701, let's avoid validating config end to end until the feature support is added: you can do this either by detaching the wiring from Cluster config layer, or implement logic first and then come back to this PR.

addressed in 9afebba

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