-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Configurable Load Balancing #16082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Configurable Load Balancing #16082
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: elijah-rou The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @elijah-rou. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
ec52658
to
bd81542
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16082 +/- ##
==========================================
+ Coverage 80.04% 80.20% +0.16%
==========================================
Files 214 214
Lines 16887 17019 +132
==========================================
+ Hits 13517 13650 +133
- Misses 3008 3010 +2
+ Partials 362 359 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/retest |
@elijah-rou: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
9496641
to
6ed9891
Compare
/ok-to-test |
6ed9891
to
4c6c42a
Compare
There are empty aliases in OWNER_ALIASES, cleanup is advised. |
Rather than bake this into the revision spec I think it would be more simpler to experiment using an annotation on the revision. Also the diff has all the excess commits. I would suggest rebasing this on |
can do |
Signed-off-by: Knative Automation <[email protected]>
bumping knative.dev/hack f88b7db...af735b2: > af735b2 Fix dot releases (# 434) Signed-off-by: Knative Automation <[email protected]>
This commit implements configurable load balancing policy. - Add LoadBalancingPolicy field to RevisionSpec in v1 API - Support policies: random-choice-2, round-robin, least-connections, first-available - Add validation for LoadBalancingPolicy in revision validation - Update CRD definitions for Configuration, Revision, and Service resources - Add validateLoadBalancingPolicy() to validate policy strings - Add pickLBPolicy() to select appropriate LB policy based on configuration - Convert lbPolicy and containerConcurrency to atomic types for thread-safe updates - Implement dynamic policy updates via revisionUpdated() method - Default policy selection based on container concurrency: - CC=0: random-choice-2 - CC=1-3: first-available - CC>3: round-robin - Fix leastConnectionsPolicy to use weight field instead of removed InFlight() - Add nil-safety checks to randomLBPolicy - Maintain existing policy implementations with minor safety improvements - Add LoadBalancingPolicy to defaults configuration - Update generated deepcopy methods for new field - Add TestLoadBalancingPolicySelection for policy selection logic - Add TestThrottlerUsesRevisionLoadBalancingPolicy for revision-level policies - Add TestDynamicLoadBalancingPolicyUpdate for runtime policy changes - Fix type mismatches (int32 vs uint32) in weight comparisons - Remove unused imports and variables - Maintain backward compatibility with existing pod tracking tests - Update serving-api.md with LoadBalancingPolicy field documentation This change enables users to configure load balancing behavior per revision.
ebd3fef
to
8a7e201
Compare
/retest |
This commit implements configurable load balancing policy.
Add LoadBalancingPolicy field to RevisionSpec in v1 API
Support policies: random-choice-2, round-robin, least-connections, first-available
Add validation for LoadBalancingPolicy in revision validation
Update CRD definitions for Configuration, Revision, and Service resources
Add validateLoadBalancingPolicy() to validate policy strings
Add pickLBPolicy() to select appropriate LB policy based on configuration
Convert lbPolicy and containerConcurrency to atomic types for thread-safe updates
Implement dynamic policy updates via revisionUpdated() method
Default policy selection based on container concurrency:
Fix leastConnectionsPolicy to use weight field instead of removed InFlight()
Add nil-safety checks to randomLBPolicy
Maintain existing policy implementations with minor safety improvements
Add LoadBalancingPolicy to defaults configuration
Update generated deepcopy methods for new field
Add TestLoadBalancingPolicySelection for policy selection logic
Add TestThrottlerUsesRevisionLoadBalancingPolicy for revision-level policies
Add TestDynamicLoadBalancingPolicyUpdate for runtime policy changes
Fix type mismatches (int32 vs uint32) in weight comparisons
Remove unused imports and variables
Maintain backward compatibility with existing pod tracking tests
Update serving-api.md with LoadBalancingPolicy field documentation
This change enables users to configure load balancing behavior per revision.