You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "RockteMQ-AI (via GitHub)" <gi...@apache.org> on 2026/06/15 03:45:58 UTC

[PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

RockteMQ-AI opened a new pull request, #10516:
URL: https://github.com/apache/rocketmq/pull/10516

   ## 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 `permitKeepAliveTime` or `permitKeepAliveWithoutCalls`, which means gRPC Netty server defaults apply:
   
   - `permitKeepAliveTime` = **5 minutes** — clients cannot send keepalive pings more frequently than every 5 minutes
   - `permitKeepAliveWithoutCalls` = **false** — keepalive pings on idle connections are rejected
   
   This 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`:
   
   | Parameter | Default | Description |
   |-----------|---------|-------------|
   | `grpcServerPermitKeepAliveTimeMillis` | 10000 (10s) | Minimum time between client keepalive pings |
   | `grpcServerPermitKeepAliveWithoutCalls` | true | Allow keepalive pings when no active RPCs |
   
   Apply these in `GrpcServerBuilder`:
   ```java
   serverBuilder
       .permitKeepAliveTime(config.getGrpcServerPermitKeepAliveTimeMillis(), TimeUnit.MILLISECONDS)
       .permitKeepAliveWithoutCalls(config.isGrpcServerPermitKeepAliveWithoutCalls());
   ```
   
   ## Impact
   
   - **Backward compatible**: Default values are more permissive than current implicit defaults
   - **Minimal overhead**: ~8KB/hour per connection at 30s interval
   - **Enables faster detection**: Once clients reduce keepAliveTime, dead-connection detection can drop from 5.5 minutes to ~40 seconds


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4705197866

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10516?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `36.36364%` with `7 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 48.03%. Comparing base ([`c4f18d9`](https://app.codecov.io/gh/apache/rocketmq/commit/c4f18d96bb5c34661b65f9cb967bb8971f4b15b2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cbf8018`](https://app.codecov.io/gh/apache/rocketmq/commit/cbf80183dbf0742ee0129292cc2ad64449afdf72?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on develop.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10516?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../org/apache/rocketmq/proxy/config/ProxyConfig.java](https://app.codecov.io/gh/apache/rocketmq/pull/10516?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fconfig%2FProxyConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbmZpZy9Qcm94eUNvbmZpZy5qYXZh) | 50.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10516?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../apache/rocketmq/proxy/grpc/GrpcServerBuilder.java](https://app.codecov.io/gh/apache/rocketmq/pull/10516?src=pr&el=tree&filepath=proxy%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fproxy%2Fgrpc%2FGrpcServerBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvR3JwY1NlcnZlckJ1aWxkZXIuamF2YQ==) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10516?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              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     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10516?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4705204390

   Done. The default value of `grpcServerPermitKeepAliveTimeMillis` has been updated to `30000` (30s) in commit cbf8018.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "qianye1001 (via GitHub)" <gi...@apache.org>.
qianye1001 commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4704873962

   @RockteMQ-AI grpcServerPermitKeepAliveTimeMillis default value set 30s


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "qianye1001 (via GitHub)" <gi...@apache.org>.
qianye1001 commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4704342454

   grpcServerPermitKeepAliveTimeMillis default value set 30s


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4705595061

   Thanks for the feedback! The default value of `grpcServerPermitKeepAliveTimeMillis` has been updated to `30000` (30 seconds) in commit cbf8018.
   
   ---
   *Automated reply by github-manager-bot*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10510] Add gRPC server permit keepalive configuration [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #10516:
URL: https://github.com/apache/rocketmq/pull/10516#issuecomment-4706027429

   Hi @qianye1001, thanks for the suggestion! The default value of `grpcServerPermitKeepAliveTimeMillis` has been updated to `30000` (30 seconds) in commit cbf80183d. Please let us know if any further adjustments are needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org