Skip to content
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

RandomChoice 2 policy wasn't random when the number of targets is 2 (with equal weight) #14028

Merged
merged 2 commits into from
May 30, 2023

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented May 29, 2023

Fixes: #14011
Fixes: #12593

Proposed Changes

  • Activator Random Choice 2 Policy will now pick randomly between two targets that have equal weight

Release Note

Fix activator load balancing when using unbounded concurrency and when you have two instances of a revision

@knative-prow knative-prow bot requested review from jsanin-vmw and kauana May 29, 2023 18:25
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/autoscale area/networking approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 29, 2023
@dprotaso dprotaso changed the title RandomChoice 2 policy wasn't random when the number of targets is 2 RandomChoice 2 policy wasn't random when the number of targets is 2 (with equal weight) May 29, 2023
@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (6020cec) 86.21% compared to head (b4fb149) 86.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14028      +/-   ##
==========================================
+ Coverage   86.21%   86.23%   +0.02%     
==========================================
  Files         199      199              
  Lines       14759    14767       +8     
==========================================
+ Hits        12724    12734      +10     
+ Misses       1733     1731       -2     
  Partials      302      302              
Impacted Files Coverage Δ
pkg/activator/net/lb_policy.go 96.72% <100.00%> (+0.23%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

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

Nice find!

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 30, 2023
@knative-prow
Copy link

knative-prow bot commented May 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, ReToCode

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ReToCode
Copy link
Member

/retest

@knative-prow knative-prow bot merged commit bdaa436 into knative:main May 30, 2023
62 checks passed
@dprotaso dprotaso deleted the fix-random-choice-2-lb branch May 30, 2023 14:08
@dprotaso
Copy link
Member Author

dprotaso commented Jun 1, 2023

/cherry-pick release-1.10
/cherry-pick release-1.9

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #14052

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9

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/test-infra repository.

@dprotaso
Copy link
Member Author

dprotaso commented Jun 1, 2023

/cherry-pick release-1.9

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #14053

In response to this:

/cherry-pick release-1.9

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/autoscale area/networking lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC load balancing With min-scale > 1 and activator only the first pod receive traffic
3 participants