-
Notifications
You must be signed in to change notification settings - Fork 605
HDDS-15382. Close idle connection for Datanode GRPC server #10371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Comment on lines
+147
to
+148
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1min?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1min is a little aggressive. |
||
| // 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) | ||
|
ChenSammi marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 15s?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 15s is a little aggressive. |
||
| .addService(ServerInterceptors.intercept( | ||
| xceiverService.bindServiceWithZeroCopy(), | ||
| new GrpcServerInterceptor())); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also set MaxConnectionAge() to 1H?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a long running application, a ozone client can exist for hours, even days.