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

Add initial guide about HTTP/2 connection pooling #350

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions guides/pooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Managing HTTP/2 Connections Efficiently

When managing large numbers of gRPC HTTP/2 connections, you may benefit from pooling of some sort.

Currently `elixir-grpc` does not offer pooling functionality, but [here is an excellent guide on using Elixir's `Registry` module to create your own resource pools](https://andrealeopardi.com/posts/process-pools-with-elixirs-registry/).

It's also worth noting that if using the `Mint` adapter for HTTP/2, you can choose which connection to use by checking the value of each connection's open request count with `open_request_count/1` .

If you'd prefer to use an existing pool implementation, [check out `conn_grpc` on Hex](https://hexdocs.pm/conn_grpc/ConnGRPC.Pool.html)!
Loading