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: Sharing connection between service clients #1588

Open
drmontgomery opened this issue Mar 8, 2022 · 2 comments
Open

Feature: Sharing connection between service clients #1588

drmontgomery opened this issue Mar 8, 2022 · 2 comments

Comments

@drmontgomery
Copy link
Contributor

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.

@drmontgomery
Copy link
Contributor Author

Added pull request as a more concrete example of what I'm proposing.

@raboof
Copy link
Member

raboof commented Aug 23, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants