This depends on how homogeneous your backends are. For example, if your
proxy going to the same logical set of backends each time, (even if they
are distinct machines) then yes this is possible with gRPC. In gRPC, a
channel represent a higher level concept than a single client. It
represents multiple connections to multiple backends (a.k.a. Servers).
In your case, it seems like you should build a map of hostname (a.k.a.
"target") to Channel and pick the correct channel to serve requests to in
your proxy. This works well if you are handling a small number hostnames.
Each channel will have its own tcp connections, but there will be few
You can do more advanced things too with your host name. If the backends
that you send traffic to route requests based on the host name, but each
backend can handle the requests of other host names, then you can reduce
the number of connections even further. For example, if you know that
foo.mydomain.com and bar.mydomain.com both physically point to the same
set of servers, then they can both share the same channel. In your
channel, you can override the "authority" field but still reuse the same
We can provide a better answer if you could share a little more detail
about what you want to do.
On Thursday, December 1, 2016 at 8:59:45 AM UTC-8, killjason wrote:
> (moved from: https://github.com/grpc/grpc-java/issues/2470)
> Imagine there are 10k grpc-clients, they established 10k http2
> connections(TCP-connections) with the http2 reverse proxy; then http2
> reverse proxy create 10k http2 connections(TCP-connections) to the
> origin(backend) server.
> Is it possible to reduce the 10k connections between proxy and
> origin(backend) server?
> for example, can a connection pool be used in reverse proxy to reduce
> connections with backend server?
> This picture can explain better:
> [image: image]
> this picture is in Nginx blog, Is it possible to do the same thing to
> reduce connections with backend serevrs using http2-reverse proxy?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.