Skip to content

Commit 45352ce

Browse files
authored
[rpc] Support NettyClient enable TCP_NODELAY and SO_KEEPALIVE (#502)
1 parent 465730f commit 45352ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fluss-rpc/src/main/java/com/alibaba/fluss/rpc/netty/client/NettyClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public NettyClient(Configuration conf, ClientMetricGroup clientMetricGroup) {
9090
.channel(NettyUtils.getClientSocketChannelClass(eventGroup))
9191
.option(ChannelOption.ALLOCATOR, pooledAllocator)
9292
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeoutMs)
93+
.option(ChannelOption.TCP_NODELAY, true)
94+
.option(ChannelOption.SO_KEEPALIVE, true)
9395
.handler(new ClientChannelInitializer(connectionMaxIdle));
9496
this.clientMetricGroup = clientMetricGroup;
9597
NettyMetrics.registerNettyMetrics(clientMetricGroup, pooledAllocator);

0 commit comments

Comments
 (0)