diff --git a/conf/broker.conf b/conf/broker.conf index 4d6bb9162bf62..d6086f1e389f0 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -1256,6 +1256,28 @@ managedLedgerDefaultAckQuorum=2 # the BookkeeperPackagesStorage bookkeeper client), except the distributed log bookkeeper client. # The dlog bookkeeper client is configured in the functions worker configuration file. +# TCP keep-alive settings for the BookKeeper client connections from the broker to bookies. +# These options were introduced in BookKeeper 4.17.3 (see apache/bookkeeper#4683) and are +# forwarded to the BookKeeper client via the generic "bookkeeper_" prefix mechanism above. +# A value of -1 (BookKeeper default) defers to the operating system's TCP keep-alive settings. +# Uncomment and adjust to enable finer-grained keep-alive probing from the broker. +# +# Note: TCP keep-alive is a two-sided mechanism. Tuning these on the broker (BookKeeper +# client) side only affects connections initiated by the broker. To complete the picture +# you should also tune the bookie node's OS-level keep-alive settings via sysctl, e.g. +# net.ipv4.tcp_keepalive_time / tcp_keepalive_intvl / tcp_keepalive_probes, since the +# BookKeeper server (bookie) currently does not expose application-level keep-alive knobs. + +# Idle time (in seconds) before the first TCP keep-alive probe is sent on an otherwise idle +# BookKeeper client connection. +#bookkeeper_tcpKeepIdle=300 +# Interval (in seconds) between subsequent TCP keep-alive probes when no acknowledgement is +# received from the bookie. +#bookkeeper_tcpKeepIntvl=60 +# Number of unacknowledged TCP keep-alive probes before the connection is considered dead +# and closed. +#bookkeeper_tcpKeepCnt=5 + # How frequently to flush the cursor positions that were accumulated due to rate limiting. (seconds). # Default is 60 seconds managedLedgerCursorPositionFlushSeconds=60