pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Broker & Bookie] Configure Bookkeeper client & server backpressure by default

Open lhotari opened this issue 4 years ago • 7 comments

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 avatar Apr 29 '21 10:04 lhotari

@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 avatar Apr 29 '21 10:04 eolivelli

@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 avatar Apr 29 '21 11:04 lhotari

@lhotari yes I have picked it to branch-7.2

eolivelli avatar Apr 29 '21 11:04 eolivelli

There is also https://github.com/apache/bookkeeper/issues/2521 in BK related to the lack of backpressure configuration in Pulsar by default.

lhotari avatar Aug 24 '21 14:08 lhotari

The issue had no activity for 30 days, mark with Stale label.

codelipenghui avatar Mar 04 '22 07:03 codelipenghui

related: #14861 and https://github.com/apache/bookkeeper/pull/3139

lhotari avatar May 11 '22 04:05 lhotari

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

lhotari avatar Aug 09 '22 15:08 lhotari

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.

lhotari avatar Sep 14 '22 11:09 lhotari