feat(tonic-xds): parse A32 circuit breaking config#2700
Open
mingley wants to merge 2 commits into
Open
Conversation
7ead3cd to
c6de02c
Compare
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
c6de02c to
10e741c
Compare
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. |
543ca6a to
8e5ba25
Compare
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
8e5ba25 to
9afebba
Compare
Author
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
This is the first scaffold PR for gRFC A32 circuit breaking under #2444. It starts carrying the CDS
circuit_breakers.thresholds[].max_requestsvalue through the validatedClusterResourcewithout changing request routing or load-balancing behavior yet.Solution
Adds a small
CircuitBreakingConfigresource helper that:max_requeststo 1024 when CDS circuit breakers are absent or no DEFAULT threshold is configuredRoutingPriority::Defaultthreshold, matching Envoy/gRFC behaviormax_requests; all other circuit-breaker fields remain ignored for this scaffoldEnforcement 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 --checkcargo test -p tonic-xds xds::resourcecargo check -p tonic-xds --all-features