Extract ORCA logic from CSWRR into reusable library#43695
Open
jukie wants to merge 3 commits intoenvoyproxy:mainfrom
Open
Extract ORCA logic from CSWRR into reusable library#43695jukie wants to merge 3 commits intoenvoyproxy:mainfrom
jukie wants to merge 3 commits intoenvoyproxy:mainfrom
Conversation
…er into reusable common library Signed-off-by: jukie <isaac.wilson514@gmail.com>
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.
This is related to #43665 and is part 1 to enable adding new ORCA-based LB policies without duplicating CSWRR internals.
Extracts ORCA weight management logic from
ClientSideWeightedRoundRobinLoadBalancerinto a reusableOrcaWeightManagerclass. This is a refactor with no behavior change and all existing CSWRR tests pass.OrcaWeightManagerConfig— config struct for timing params, metric names, and error penaltyOrcaLoadReportHandler— computes host weight from ORCA load reportsOrcaHostLbPolicyData— per-host LB data (weight + timestamps), renamed fromClientSideHostLbPolicyDataOrcaWeightManager— orchestrates periodic weight updates via timer and priority-set callbacksAI disclosure: AI agents were used during implementation and for writing tests but I fully understand the changes here
Commit Message: Extract OrcaWeightManager from ClientSideWeightedRoundRobinLoadBalancer into reusable common library
Additional Description: Extracts ORCA internals from CSWRR to allow for more ORCA-based LB policies without duplication
Risk Level: Low, clean extraction without any behavior changes
Testing: New test suite added, all existing CSWRR tests pass unchanged, and WrrLocality tests pass
Docs Changes: No user-facing changes or docs update needed
Release Notes: None
Platform Specific Features: N/A
xRef: #43665