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

Add power-of-two picker #21

Merged
merged 5 commits into from
Jun 9, 2023
Merged

Add power-of-two picker #21

merged 5 commits into from
Jun 9, 2023

Conversation

jchadwick-buf
Copy link
Member

@jchadwick-buf jchadwick-buf commented Jun 9, 2023

Hmm, this almost seems too simple.

@jchadwick-buf jchadwick-buf requested a review from jhump June 9, 2023 15:23
@linear
Copy link

linear bot commented Jun 9, 2023

TCN-1915 Add power-of-two picker

This picker randomly selects two connections and then returns the one with fewer active requests.

TCN-1866 Add default picking algorithms

Out-of-the-box, we want to provide round-robin, least-loaded, random, and power of two (pick two at random and use the least loaded between them).

balancer/picker/poweroftwo.go Outdated Show resolved Hide resolved
balancer/picker/poweroftwo.go Outdated Show resolved Hide resolved
balancer/picker/poweroftwo.go Outdated Show resolved Hide resolved
Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

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

Looks great!

@jchadwick-buf jchadwick-buf merged commit 4e10b5c into main Jun 9, 2023
@jchadwick-buf jchadwick-buf deleted the jchadwick/poweroftwo branch June 9, 2023 17:50
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.

2 participants