Skip to content

HDDS-15149. Limit Connections Created by DataNode GRPC Server#10184

Open
YutaLin wants to merge 8 commits intoapache:masterfrom
YutaLin:HDDS-15149_limit_connections_on_datanode_grpc
Open

HDDS-15149. Limit Connections Created by DataNode GRPC Server#10184
YutaLin wants to merge 8 commits intoapache:masterfrom
YutaLin:HDDS-15149_limit_connections_on_datanode_grpc

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented May 5, 2026

What changes were proposed in this pull request?

Currently there is no limited control of network connections created by Datanode GRPC server, which caused "too many open files" issue in Datanode, 126920 TCP connections out of 128103 total open file handlers.

Introduce GrpcConnectionLimitFilter to control connections and add set default max connections to 5,000, leaves most of the fds for files/DBs. Also add os_backlog to control burst connections.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15149

How was this patch tested?

Add test for connection limit filter and node configuration, also run ci tests.

@YutaLin YutaLin force-pushed the HDDS-15149_limit_connections_on_datanode_grpc branch from e8a5efc to 10ff1ee Compare May 5, 2026 04:18
@YutaLin YutaLin force-pushed the HDDS-15149_limit_connections_on_datanode_grpc branch from 19383d1 to 63e6c63 Compare May 5, 2026 05:26
xceiverService.bindServiceWithZeroCopy(),
new GrpcServerInterceptor()));
new GrpcServerInterceptor()))
.addTransportFilter(connectionLimitFilter);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YutaLin , thanks for working on this.

Could you try use NettyServerBuilder's withChildOption, to set ChannelOption.SO_BACKLOG?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ChenSammi, thanks for the review,
I've added so_backlog to prevent burst connections, also keep connection limit filter to control sustained high connection.

@YutaLin YutaLin requested a review from ChenSammi May 5, 2026 17:59
@YutaLin YutaLin marked this pull request as ready for review May 5, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants