wolfstudy opened a new pull request, #4683:
URL: https://github.com/apache/bookkeeper/pull/4683

   ### Motivation
   In a private environment, network connectivity between data centers is 
limited by firewall configuration. When the Broker accesses Bookkeeper 
infrequently, exceeding the firewall's default deactivation time (20 minutes), 
the firewall will actively disconnect the Broker → Bookkeeper connection. 
   At this point, if a new production or consumption request is made, the 
Broker cannot safely access the Bookkeeper node again, causing 
production/consumption failures that cannot be automatically recovered from. 
The error message primarily indicates connection-level anomalies:
   <img width="2944" height="738" alt="Clipboard_Screenshot_1763091013" 
src="https://github.com/user-attachments/assets/e58b53b9-1c79-49cd-a4d7-1040f52569e0";
 />
   
   
   The current Broker → Bookkeeper access chain is based on the Netty 
communication framework, and the keepalive function at the TCP connection layer 
reuses the system default SO_KEEPALIVE. The code is `PerChannelBookieClient` → 
`connect()`, as follows:
   <img width="1982" height="434" alt="Clipboard_Screenshot_1763091110" 
src="https://github.com/user-attachments/assets/979716b6-d99a-4dfd-9829-cd724c597c20";
 />
   
   If no policy is explicitly set, the "System Default" option in the table 
follow will be used directly:
   
   TCP_KEEPIDLE | 7200s
   -- | --
   TCP_KEEPINTVL | 75s
   TCP_KEEPCNT | 9
   
   
   
   
   ### Changes
   
   Include the following three configuration items in ClientConfiguration:
   
   ```
       public static final String TCP_KEEPIDLE = "tcpKeepIdle";
       public static final String TCP_KEEPINTVL = "tcpKeepIntvl";
       public static final String TCP_KEEPCNT = "tcpKeepCnt";
   ```
   
   To maintain compatibility, the system default configuration will still be 
used by default.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to