[Broker & Bookie] Configure Bookkeeper client & server backpressure by default
Is your enhancement request related to a problem? Please describe.
Pulsar doesn't take advantage of Bookkeeper's client-side and server-side backpressure features. https://github.com/apache/bookkeeper/issues/1086 and https://github.com/apache/bookkeeper/issues/1409 are the original Bookkeeper issues about the lack of backpressure handling. Similar problems exist with Pulsar since backpressure handling isn't configured. One of the reported issues is #9562 .
Describe the solution you'd like
Configure waitTimeoutOnBackpressureMs in the Bookkeeper client configuration (Pulsar broker side) and waitTimeoutOnResponseBackpressureMs in the Bookkeeper server ("Bookie") configuration with sane default values.
Additional context
#9562
@lhotari since 2.8 you can configure the bookkeeper client inside the broker just by adding bookkeeper_xxx in broker.conf
check for instance the case of "bookkeeper_opportunisticStriping"
@eolivelli Would it be possible to cherry-pick #9232 to branch-2.7 so that it would be possible to configure waitTimeoutOnBackpressureMs on the broker side by using bookkeeper_waitTimeoutOnBackpressureMs configuration key?
@lhotari yes I have picked it to branch-7.2
There is also https://github.com/apache/bookkeeper/issues/2521 in BK related to the lack of backpressure configuration in Pulsar by default.
The issue had no activity for 30 days, mark with Stale label.
related: #14861 and https://github.com/apache/bookkeeper/pull/3139
Fixes for backpressure issues on bookkeeper side: https://github.com/apache/bookkeeper/pull/3321, https://github.com/apache/bookkeeper/pull/3323, https://github.com/apache/bookkeeper/pull/3324
Pulsar uses Bookkeeper protocol V2 by default because V3 uses GRPC and that is not "garbage free". With V2 protocol, there is less GC overhead.
The backpressure feature in bookkeeper wasn't implemented in V2 until https://github.com/apache/bookkeeper/pull/3324 . This is released in 4.14.6 / 4.15.1 versions of bookkeeper.