Hi,
I have an application which retrieves data from service. `iperf` shows
download throughout for one single TCP connections is only 20MBps, but the
requirement is 100MBps.
I tried `iperf` with 10 TCP connections (`iperf -c <IP port> -P 10`), and
it shows the bandwidth could be 100MBps. So I want to use multiple TCP
connections.
I use grpc to transfer data. I know
- grpc leverages HTTP/2, which natively supports IO multiplexing, but the
limitation for my application is TCP b/w, so have to use multiple TCP
connections
- `channel` is the abstraction which represents TCP connection
- `stub` is for client use. So it should be possible to have multiple stubs
sharing one single `channel`
My way of doing it is
grpc::ChannelArguments args;
args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
std::shared_ptr<Channel> channel(grpc::CreateCustomChannel(
ip_port, grpc::InsecureChannelCredentials(), args));
stub_ = NewStub(channel);
But from `ss`, I only see a few TCP connections created.
> ss -antp | grep 443 | wc -l
3
And not all of them are from my program.
My question is: how to create multiple TCP connection in grpc in C++?
Thank you!
--
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/8cb25d24-8e22-44a9-86b3-0fb4ec76fc00n%40googlegroups.com.