This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 386c567a7b0 HDDS-15382. Close idle connection for Datanode GRPC server
(#10371)
386c567a7b0 is described below
commit 386c567a7b0cb09d1c37e1adfa2481c5d745309f
Author: Sammi Chen <[email protected]>
AuthorDate: Mon Jun 1 11:45:08 2026 +0800
HDDS-15382. Close idle connection for Datanode GRPC server (#10371)
---
.../container/common/statemachine/DatanodeConfiguration.java | 4 ++--
.../container/common/transport/server/XceiverServerGrpc.java | 11 +++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java
index 1fd094b55f1..506dd79c37d 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java
@@ -145,7 +145,7 @@ public class DatanodeConfiguration extends
ReconfigurableConfig {
static final int BLOCK_DELETE_THREADS_DEFAULT = 5;
public static final String GRPC_SO_BACKLOG_KEY =
"hdds.datanode.grpc.so.backlog";
- public static final int GRPC_SO_BACKLOG_DEFAULT = 4096;
+ public static final int GRPC_SO_BACKLOG_DEFAULT = 256;
public static final String BLOCK_DELETE_COMMAND_WORKER_INTERVAL =
"hdds.datanode.block.delete.command.worker.interval";
@@ -167,7 +167,7 @@ public class DatanodeConfiguration extends
ReconfigurableConfig {
*/
@Config(key = "hdds.datanode.grpc.so.backlog",
type = ConfigType.INT,
- defaultValue = "4096",
+ defaultValue = "256",
tags = {DATANODE},
description = "The SO_BACKLOG value for the Datanode gRPC server socket.
" +
"This limits the number of pending connections in the kernel's " +
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerGrpc.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerGrpc.java
index 58be7965a74..0afbabb96a2 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerGrpc.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerGrpc.java
@@ -139,6 +139,17 @@ public XceiverServerGrpc(DatanodeDetails datanodeDetails,
.channelType(channelType)
.withOption(ChannelOption.SO_BACKLOG, soBacklog)
.executor(readExecutors)
+ // If a client does not send an actual functional business RPC for 15
minutes,
+ // the server kicks them off with a GOAWAY frame.
+ .maxConnectionIdle(15, TimeUnit.MINUTES)
+ // If the server receives absolutely zero network traffic from a
client for
+ // 5 minutes, the server proactively sends an HTTP/2 PING frame to
verify
+ // if the network wire or client machine is still alive.
+ .keepAliveTime(5, TimeUnit.MINUTES)
+ // If the server fires a ping and the client fails to respond with a
+ // PING ACK within 30 seconds, the server assumes the socket is a dead
+ // "zombie connection" and immediately destroys the TCP socket.
+ .keepAliveTimeout(30, TimeUnit.SECONDS)
.addService(ServerInterceptors.intercept(
xceiverService.bindServiceWithZeroCopy(),
new GrpcServerInterceptor()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]