Skip to content

Conversation

@altaiezior
Copy link

@altaiezior altaiezior commented Nov 2, 2025

What type of PR is this?

What this PR does / why we need it:
This PR provides addition of new load balancer type client side weighted round robin. This is a new load balancing extension introduced since envoy 1.32

https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto

Which issue(s) this PR fixes:

Fixes #7305

Release Notes: Yes/No

@altaiezior altaiezior requested a review from a team as a code owner November 2, 2025 03:31
@altaiezior
Copy link
Author

@jukie I have added the implementation and also tested it on my local setup

PS: the repo is so easy to contribute everything just works with the docs given on the site :)

@altaiezior
Copy link
Author

Also I wanted to know should I include slow start in client wrr?

So the thing is that I have submitted the proposal in grpc-xds grpc/proposal#498 and also in envoy I have got the proto updated.

It is not implemented yet, but I am trying to pick it up this month if my time allows

@altaiezior
Copy link
Author

altaiezior commented Nov 2, 2025

Also I am unsure of how to test this e2e, so I have just included an AI generated e2e test suite.

The challenge here is that we need multiple replicas with each server respond with a specific header containing rps and cpu_utilisation and then the traffic is distributed by calculating the weight (rps / cpu)

I don't know what the current e2e tests allow and if this type of test case is feasible to write

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 72.85714% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.89%. Comparing base (fc43a31) to head (6321ec4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/xds/translator/cluster.go 58.53% 16 Missing and 1 partial ⚠️
internal/gatewayapi/clustersettings.go 92.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7407      +/-   ##
==========================================
+ Coverage   72.85%   72.89%   +0.04%     
==========================================
  Files         237      237              
  Lines       35623    35690      +67     
==========================================
+ Hits        25952    26017      +65     
- Misses       7824     7827       +3     
+ Partials     1847     1846       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@altaiezior
Copy link
Author

altaiezior commented Nov 4, 2025

Also I wanted to know should I include slow start in client wrr?

So the thing is that I have submitted the proposal in grpc-xds grpc/proposal#498 and also in envoy I have got the proto updated.

It is not implemented yet, but I am trying to pick it up this month if my time allows

I have started the implementation of slow_start_config and locality lb config with WRR as well, if possible I would also want to include them in the gatway implementation.

envoyproxy/envoy#41841

@jukie
Copy link
Contributor

jukie commented Nov 13, 2025

We wait to add features here until they've made it into a full envoy release. The flow would be getting this lb support added for 1.7 and if your envoy changes get merged we can add that support to gateway in 1.8.

Let's keep the scope of this PR to what's currently available and we can always include additional features in a follow-up. Are you able to make the suggested changes or can you join the contributors call next week to discuss?

@altaiezior
Copy link
Author

Sure, I just paused because the other changes were also approved, but I understand I will make the respective changes as suggested. Will try to complete them by today / tomorrow @jukie

@altaiezior
Copy link
Author

@jukie I have made the respective changes

anurag.ag added 6 commits November 17, 2025 05:48
…Gateway CRDs, ensuring configurable parameters and validation rules are integrated. Includes e2e test for validation.

Signed-off-by: anurag.ag <[email protected]>
…eway CRDs and related configurations. Update associated test data and documentation.

Signed-off-by: anurag.ag <[email protected]>
…entSideWeightedRoundRobin configuration, update affected tests and CRDs.

Signed-off-by: anurag.ag <[email protected]>
…cross Gateway CRDs, configuration files, and related tests. Adjust documentation to reflect percentage-based representation.

Signed-off-by: anurag.ag <[email protected]>
@jukie
Copy link
Contributor

jukie commented Nov 27, 2025

Overall looks good, just a few more comments @anuragagarwal561994! Thanks for adding this and make sure to run gen-check before pushing.

Sorry for the delayed review on this. I'll prioritize helping you with this next week.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added stale and removed stale labels Jan 8, 2026
@altaiezior
Copy link
Author

@jukie can you help me resolve the changes I need to make with the above MR to make it releasable, I was on vacation for a while. I am back now and can work upon them

anurag.ag added 2 commits January 20, 2026 17:22
…h `BackendUtilization` in Gateway CRDs, configurations, and tests. Revise validation rules, documentation, and enums accordingly.

Signed-off-by: anurag.ag <[email protected]>
@netlify
Copy link

netlify bot commented Jan 21, 2026

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 9c9dc20
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69812ae81e3cef000703a1cc
😎 Deploy Preview https://deploy-preview-7407--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Anurag Agarwal and others added 4 commits January 21, 2026 18:19
@jukie
Copy link
Contributor

jukie commented Jan 21, 2026

This is in a pretty good state, thanks @anuragagarwal561994! If you'd like some help building the e2e or want to brainstorm feel free to DM in the envoy slack.

@altaiezior
Copy link
Author

This is in a pretty good state, thanks @anuragagarwal561994! If you'd like some help building the e2e or want to brainstorm feel free to DM in the envoy slack.

I already have a e2e setup on my local that I had built with earlier changes using AI, I would need to do some modifications in it after the new changes and make it ready to be published in my repo, because I am currently using an internal library we built to consistently publish the server metrics across applications.

Anurag Agarwal added 3 commits January 29, 2026 02:04
…kend Utilization (ORCA) load balancing in Gateway CRDs and related docs. Refine header handling and metric formats.

Signed-off-by: anurag.ag <[email protected]>
…ercent` across API, tests, and internal logic for clarity and precision. Adjust related documentation and validations.

Signed-off-by: anurag.ag <[email protected]>
…n`. Adjust logic, tests, and documentation to highlight default value and ORCA header removal.

Signed-off-by: anurag.ag <[email protected]>

gwAddr := kubernetes.GatewayAndRoutesMustBeAccepted(t, suite.Client, suite.TimeoutConfig, suite.ControllerName, kubernetes.NewGatewayRef(gwNN), &gwapiv1.HTTPRoute{}, false, routeNN)

t.Run("traffic should be split roughly evenly (defaults to equal weights without ORCA)", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we test the feature in the e2e ? i.e. have the backend craft a endpoint-load-metrics response header and use that in LB decision making

Copy link
Author

Choose a reason for hiding this comment

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

@arkodg this we have discussed in earlier comment that it will take some time to build and can be done seaprately because this requires changes with the current echo application too.

#7407 (comment)

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.

Support for Client Load Balancing Weighted Round Robin

5 participants