Skip to content

Commit d08af2f

Browse files
cyb70289pitrou
authored andcommitted
ARROW-9168: [C++][Flight] Don't share TCP connection among clients
Flight benchmark performs worse when working threads increases. It can be improved by setting gRPC option GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL to make each client creating its own TCP connection to server, without sharing one connection. Closes apache#7476 from cyb70289/flight Authored-by: Yibo Cai <cyb70289@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 60c2e36 commit d08af2f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cpp/src/arrow/flight/client.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ class FlightClient::FlightClientImpl {
858858
args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, 100);
859859
// Receive messages of any size
860860
args.SetMaxReceiveMessageSize(-1);
861+
// Setting this arg enables each client to open it's own TCP connection to server,
862+
// not sharing one single connection, which becomes bottleneck under high load.
863+
args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
861864

862865
if (options.override_hostname != "") {
863866
args.SetSslTargetNameOverride(options.override_hostname);

0 commit comments

Comments
 (0)