{{ message }}
xds: Implement proactive connection in RingHashLoadBalancer per gRFC A61#12596
Merged
Conversation
Implement proactive connection logic in RingHashLoadBalancer as outlined in gRFC A61. This address the missing logic where the balancer should initialize the first IDLE child when a child balancer reports TRANSIENT_FAILURE and no other children are connecting. This behavior, which was previously present before grpc#10610, ensures that a backup subchannel starts connecting immediately outside of the picker flow, reducing failover latency. Fixes grpc#12024
Update existing unit tests and add new test cases to validate the proactive connection behavior. Verification counts in several tests have been adjusted to reflect that the balancer now initiates connections immediately upon subchannel failure.
ejona86
reviewed
Jan 5, 2026
Contributor
Author
ce9ea98 to
f5a4934
Compare
Contributor
Author
|
I merged the latest master branch expecting the CI tests to pass, but unfortunately, they are still failing. |
ejona86
approved these changes
Jan 6, 2026
Member
|
Thank you! |
Contributor
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Description
This PR implements the proactive connection logic in
RingHashLoadBalanceras outlined in gRFC A61.Previously, the Java implementation only initialized child balancers when a ring-chosen endpoint was in
TRANSIENT_FAILUREduring a picker'spickSubchannelcall. This PR adds the missing logic: when a child balancer reportsTRANSIENT_FAILURE, the LoadBalancer now proactively initializes the first availableIDLEchild if no other children are currently connecting or ready.This ensures a backup subchannel starts warming up immediately outside the RPC flow, reducing failover latency and improving overall resilience. This behavior was previously present but was inadvertently lost after #10610.
Changes
maybeTriggerIdleChildConnection()toRingHashLoadBalancerto trigger proactive connections.requestConnectionverification counts).READYsubchannel already exists.Fixes #12024