Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support backpressure #2236

Merged
merged 16 commits into from
Dec 20, 2024
Merged

feat: support backpressure #2236

merged 16 commits into from
Dec 20, 2024

Conversation

Chillax-0v0 and others added 16 commits December 18, 2024 11:27
* refactor(quota): refactor `maybeRecordAndGetThrottleTimeMs`

Signed-off-by: Ning Yu <[email protected]>

* fix(quota): throttle the produce request whatever the acks is

Signed-off-by: Ning Yu <[email protected]>

* refactor(quota): separate `Request` in `ClientQuotaManager` and `RequestRate` in `BrokerQuotaManager`

Signed-off-by: Ning Yu <[email protected]>

* sytle: fix lint

Signed-off-by: Ning Yu <[email protected]>

* feat(quota): support to update broker request rate quota

Signed-off-by: Ning Yu <[email protected]>

* test(quota): test update quota

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* feat(quota): introduce `SLOW_FETCH` broker quota

Signed-off-by: Ning Yu <[email protected]>

* feat(quota): add slow fetch quota

Signed-off-by: Ning Yu <[email protected]>

* test(quota): test broker slow fetch quota

Signed-off-by: Ning Yu <[email protected]>

* test(quota): test zero quota value

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* feat(backpressure): init backpressure module

Signed-off-by: Ning Yu <[email protected]>

* feat(backpressure): implement `DefaultBackPressureManager`

Signed-off-by: Ning Yu <[email protected]>

* test(backpressure): test `DefaultBackPressureManager`

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* fix: fix logs

Signed-off-by: Ning Yu <[email protected]>

* feat(quota): support to get current quota metric value

Signed-off-by: Ning Yu <[email protected]>

* refactor(backpressure): remove `Regulator#minimize`

Signed-off-by: Ning Yu <[email protected]>

* perf(quota): increase the max of broker quota throttle time

Signed-off-by: Ning Yu <[email protected]>

* perf(backpressure): decrease cooldown time

Signed-off-by: Ning Yu <[email protected]>

* perf(quota): increase the max of broker quota throttle time

Signed-off-by: Ning Yu <[email protected]>

* docs: update comments

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* feat(quota): exclude internal client IDs from broker quota

Signed-off-by: Ning Yu <[email protected]>

* feat(autobalancer): mark producers and consumers internal clients

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* feat(backpressure): log it on recovery from backpressure

Signed-off-by: Ning Yu <[email protected]>

* feat: add metric fetch_limiter_waiting_task_num

Signed-off-by: Ning Yu <[email protected]>

* feat: add metric fetch_limiter_timeout_count

Signed-off-by: Ning Yu <[email protected]>

* feat: add metric fetch_limiter_time

Signed-off-by: Ning Yu <[email protected]>

* feat: add metric back_pressure_state

Signed-off-by: Ning Yu <[email protected]>

* feat: add metric broker_quota_limit

Signed-off-by: Ning Yu <[email protected]>

* fix(backpressure): run checkers with fixed delay

Signed-off-by: Ning Yu <[email protected]>

* style: fix lint

Signed-off-by: Ning Yu <[email protected]>

* perf: drop too large values

Signed-off-by: Ning Yu <[email protected]>

* refactor: record -1 for other states

Signed-off-by: Ning Yu <[email protected]>

* test: fix tests

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
* feat(backpressure): make back pressure manager configurable

Signed-off-by: Ning Yu <[email protected]>

* test: test diabled

Signed-off-by: Ning Yu <[email protected]>

* refactor: move backpressure from s3stream to kafka.core

Signed-off-by: Ning Yu <[email protected]>

* refactor: init `BackPressureManager` in `BrokerServer`

Signed-off-by: Ning Yu <[email protected]>

* refactor: introduce `BackPressureConfig`

Signed-off-by: Ning Yu <[email protected]>

* feat: make `BackPressureManager` reconfigurable

Signed-off-by: Ning Yu <[email protected]>

* test: test reconfigurable

Signed-off-by: Ning Yu <[email protected]>

* refactor: rename config key

Signed-off-by: Ning Yu <[email protected]>

* refactor: move metric "back_pressure_state" from s3stream to core

Signed-off-by: Ning Yu <[email protected]>

---------

Signed-off-by: Ning Yu <[email protected]>
fix: fix metric value of back pressure state

Signed-off-by: Ning Yu <[email protected]>
Signed-off-by: Ning Yu <[email protected]>
@Chillax-0v0 Chillax-0v0 self-assigned this Dec 20, 2024
@Chillax-0v0 Chillax-0v0 enabled auto-merge (rebase) December 20, 2024 03:56
@Chillax-0v0 Chillax-0v0 merged commit 9cb537a into 1.3 Dec 20, 2024
11 checks passed
@Chillax-0v0 Chillax-0v0 deleted the feat-backpressure branch December 20, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants