-
Notifications
You must be signed in to change notification settings - Fork 18
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 request: Add basic client side load balancing for gRPC #417
Comments
https://pekko.apache.org/docs/pekko-grpc/current/client/details.html#load-balancing Does this cover your use case? The docs seem to indicate that we rely on grpc-java, a separate lib, for a lot of this support. If the existing support does not suit you, can you indicate what extra you are looking for? |
As mentioned in the link you shared, "When multiple endpoints are discovered for a gRPC client, currently one is selected and used for all outgoing calls". Ideally we should be able to send requests to both endpoints in a I see in the docs, "Client-side load balancing is desirable when you are using the default static or the grpc-dns discovery mechanism.". But the meaning of default static method is not clear to me. Can we add some example for this use case? Also, I searched on internet for client side load balancing for akka-grpc with akka discovery and found old merge in akka grpc:(akka/akka-grpc#809) |
That akka-grpc PR is in Pekko gRPC. The fork was made after the merge was made. |
indeed, but there is no clear doc/explaination on how to achieve client side load balancing, even with the default static mechanism as I mentioned in above comment. |
I will repeat pekko-grpc is built on top of grpc-java and https://pekko.apache.org/docs/pekko-grpc/current/client/details.html#load-balancing highlights how to set the |
We should probably add a 'by default' there.
As that documentation mentions, while perhaps counter-intuitive, there are situations where that's a better strategy - but I agree it would be good if client-side load balancing were possible.
I suspect we should replace 'desirable' with 'possible' here.
'static' is the discovery method that is used when you don't configure a different service discovery mechanism (https://pekko.apache.org/docs/pekko-grpc/current/client/configuration.html#using-pekko-discovery-for-endpoint-discovery).
I agree that would be helpful.
Indeed that seems to contradict the documentation. Could you boil down your application to a minimal test project to show the behavior? |
There is no client side load balancing for gRPC module.
All the requests land on one instance rather than distributing the load between multiple instances.
Is it possible to add basic load balancing on client side e.g. round_robin or other pattern so request load can be distributed among instances?
The text was updated successfully, but these errors were encountered: