Subchannel pooling is enabled in gRPC around 1.8.0 version
If you start multiple connections to the same target from different threads
within the same program they start using the same endpoint on the client
side.

Starting from 1.19 version, there is an option to override this behavior by
setting the following knob.
https://github.com/grpc/grpc/blob/2c6a7e1f19a899e88d2050a1cb5d05079598e880/include/grpc/impl/codegen/grpc_types.h#L396

If you specify this argument during channel creation time, you should be
able to get one socket per each channel, sample below from C++ tests.
https://github.com/grpc/grpc/blob/526fcb5c7d4e48192edd8fdbba408101d23848f2/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc#L87

Best,
- Ram.


On Sun, Dec 1, 2019 at 6:50 PM <[email protected]> wrote:

> What version of gRPC and what language are you using?
>
> 1.20
> What operating system (Linux, Windows,...) and version?
>
> linux
> What runtime / compiler are you using (e.g. python version or version of
> gcc)
>
> gcc
> What did you do?
>
> rpc communication from c++ grpc client to java grpc server.
>
> one process, multiple threads(10-50), and one new channel/client
> (grpc::CreateChannel) per thread. When I start one process and send message
> from each threads through its rpc client, I can get only 6500qps/334MB/s.
> When I start two processes and send message with same pattern , I can get
> 11700qps/620MB/s.
> After looking into the state, I found there is only one socket connected
> to the server for each process, even there is multiple client/channel
> sending messages to the server.
> I'm guessing whether the online socket number is the root cause of
> bandwidth limitation.
> Any response is appreciated.
>
>
> What did you expect to see?
>
> multiple http2 socket connections.
> What did you see instead?
>
> only one http2 socket connection.
>
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/1edf4791-42dd-4509-a9a6-ef5f5603ebef%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/1edf4791-42dd-4509-a9a6-ef5f5603ebef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CABAVnHLqDtbm0T6rEUjeVnxNLXjh1CGK_kYQdccVgLfWaGkcAQ%40mail.gmail.com.

Reply via email to