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

[feature] add client side load balancing #242

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

nammn
Copy link
Contributor

@nammn nammn commented Nov 17, 2020

Adds the option to define a client side load balancer.
There are only 2 available balancers by default: pick_first and round_robin. Default is pick_first.

This option can be defined on the client and passed as an option e.g.

. WithClientLoadBalancing("round_robin") // for default round robin instead of first value

fixes: #103

Note

This PR uses an old grpc deprecated option because some clients are not up to date to use the newest experimental api and therefore don't even have that option.

Linting fails because of ^

Error: runner/requester.go:326:23: SA1019: grpc.WithBalancerName is deprecated: use WithDefaultServiceConfig and WithDisableServiceConfig instead.  Will be removed in a future 1.x release.  (staticcheck)
		opts = append(opts, grpc.WithBalancerName(b.config.lbStrategy))
		                    ^
Error: Process completed with exit code 1.

@bojand bojand merged commit e7a3a63 into bojand:master Nov 19, 2020
@bojand
Copy link
Owner

bojand commented Nov 19, 2020

Thank you for the PR! Released in v0.64.0.

Once we update grpc and protobuf dependencies (whenever that happends) some of this may need to be reworked (or at least new API's added), but that will be a larger body of work, as last time I tried a few things broke, especially with protobuf update.

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.

Ability to perform client load balancing
2 participants