-
Notifications
You must be signed in to change notification settings - Fork 124
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: Sharing connection between service clients #1588
Comments
Added pull request as a more concrete example of what I'm proposing. |
The feature has been merged, but we'd stll like to add a code example to the docs - perhaps let's leave the issue open for that? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most gRPC client libraries allow multiple service clients to share a single HTTP connection to a server. This is typically presented as a separate "channel" abstraction, which used to initialize the service client. (For example, see https://grpc.io/docs/languages/java/basics/#client)
In akka-grpc, on the other hand, each service client creates its own connection to the server (via creating a ClientState, which creates an InternalChannel). While this works, it does mean that an akka-grpc client that uses multiple services will use many more HTTP connections than clients using other gRPC implementations. In some contexts (e.g. load testing), this difference can be significant.
Would it be possible to add support for reusing a single HTTP connection with multiple service clients? I think exposing a channel abstraction, like other gRPC libraries, would be best, since it allows the library user to control how connections are shared between services.
The text was updated successfully, but these errors were encountered: