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

Remove custom balancer, use default pick_first #28

Merged
merged 8 commits into from
Jan 20, 2023

Conversation

kisunji
Copy link
Contributor

@kisunji kisunji commented Jan 17, 2023

After some deep code dives we concluded that calling UpdateState on the ClientConn of a resolver is a sufficient cut-off point for considering the address of the connection updated. This means there is no more need for a custom balancer to track sub-connections and we can simplify the watcher implementation greatly.

Since we are passing at most one address at a time, the default pick_first balancer is sufficient for our needs.

@kisunji kisunji changed the title Initial attempt at replacing builder with pick-first-custom Remove custom balancer, use default pick_first Jan 18, 2023
@kisunji kisunji marked this pull request as ready for review January 18, 2023 22:00
@kisunji kisunji requested a review from a team as a code owner January 18, 2023 22:00
Copy link
Contributor

@mikemorris mikemorris left a comment

Choose a reason for hiding this comment

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

LGTM with minor tweaks, tested by updating this dependency in Consul API Gateway over in hashicorp/consul-api-gateway#484 and our unit tests are passing and no longer flaky!

discovery/watcher.go Show resolved Hide resolved
docs/grpc-integration.md Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
discovery/watcher.go Show resolved Hide resolved
discovery/watcher.go Show resolved Hide resolved
@kisunji kisunji merged commit f9b5452 into main Jan 20, 2023
@kisunji kisunji deleted the kisunji/pick-first-attempt branch January 20, 2023 15:37
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.

3 participants