[ISSUE #10510] Add gRPC server permit keepalive configuration#10516
Conversation
Add configurable parameters to allow clients to send keepalive pings more frequently, enabling faster dead-connection detection: - grpcServerPermitKeepAliveTimeMillis (default: 10000ms = 10s) - grpcServerPermitKeepAliveWithoutCalls (default: true) Previously, gRPC server used implicit defaults (5min minimum interval, no pings without active RPCs), causing slow dead-connection detection (up to 5.5 minutes) and ineffective idle connection health checks. Fixes apache#10510
|
grpcServerPermitKeepAliveTimeMillis default value set 30s |
|
@RockteMQ-AI grpcServerPermitKeepAliveTimeMillis default value set 30s |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10516 +/- ##
=============================================
- Coverage 48.11% 48.03% -0.08%
+ Complexity 13348 13331 -17
=============================================
Files 1377 1377
Lines 100707 100730 +23
Branches 13010 13012 +2
=============================================
- Hits 48455 48388 -67
- Misses 46318 46395 +77
- Partials 5934 5947 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Done. The default value of |
|
Thanks for the feedback! The default value of Automated reply by github-manager-bot |
|
Hi @qianye1001, thanks for the suggestion! The default value of |
Motivation
When a TCP connection is broken without a RST, the gRPC client needs to rely on HTTP/2 PING (keepalive) to detect the dead connection. Currently, the gRPC server in the Proxy does not configure
permitKeepAliveTimeorpermitKeepAliveWithoutCalls, which means gRPC Netty server defaults apply:permitKeepAliveTime= 5 minutes — clients cannot send keepalive pings more frequently than every 5 minutespermitKeepAliveWithoutCalls= false — keepalive pings on idle connections are rejectedThis causes slow dead-connection detection (up to 5.5 minutes) and ineffective idle connection health checks.
Fixes #10510
Changes
Add two configurable parameters to
ProxyConfig:grpcServerPermitKeepAliveTimeMillisgrpcServerPermitKeepAliveWithoutCallsApply these in
GrpcServerBuilder:Impact