From 50cdfafaabac7eb17445a63b623e065f04ad6f25 Mon Sep 17 00:00:00 2001 From: Noah Betzen Date: Wed, 14 Feb 2024 13:07:53 -0800 Subject: [PATCH] Add HTTP/2 connection pooling guide --- guides/pooling.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 guides/pooling.md diff --git a/guides/pooling.md b/guides/pooling.md new file mode 100644 index 00000000..33a6e031 --- /dev/null +++ b/guides/pooling.md @@ -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)!