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

AvgShedder #20

Closed
wants to merge 24 commits into from
Closed

Conversation

nodece
Copy link
Collaborator

@nodece nodece commented Jul 23, 2024

Fixes #xyz

Main Issue: #xyz

PIP: #xyz

Motivation

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

lordcheng10 and others added 24 commits July 23, 2024 14:41
…es for UniformLoadShedder (apache#16401)

* Fixed the issue that newly added brokers could not be assigned bundles

* skip bundle==1

* add test UniformLoadShedderTest

* check style

(cherry picked from commit 6ca9ee9)
…mLoadShedder (apache#16409)

(cherry picked from commit 0f2060d)
Signed-off-by: Zixuan Liu <[email protected]>
…tation based on the least resource usage with weight (apache#16281)

email discussion thread: https://lists.apache.org/thread/36vyyhndr4og175k2bz3mfdf5ctd2xky

### Motivation
See PIP-182 apache#16274

### Modifications
See apache#16274

The main idea of the new strategy is to unify the requirement of load shedding strategy and bundle placement strategy, which consider the resource usage with weight, including historical observations.

How to calculate a score for a broker ?
- use its historical load and short-term load data with weight, which can solve the case of load jitter in a broker.

How to select a broker for assignning bundle ?
- select a broker based on which one has the least average resource usage with weight.
- the random selection algorithm is better than the `minScore` among low load brokers, and use `loadBalancerAverageResourceUsageDifferenceThresholdShedderPercentage ` to adjust the size of the `randomization pool`

(cherry picked from commit d5088e3)
Signed-off-by: Zixuan Liu <[email protected]>
(cherry picked from commit fa8ec29)
Signed-off-by: Zixuan Liu <[email protected]>
…nagerImpl.cleanupDeadBrokersData() (apache#16690)

(cherry picked from commit 21a25bf)
…n doLoadShedding (apache#16476)

* add NamespacePolicies check before unload bundle when doLoadShedding

* fix typos

Co-authored-by: nicklixinyang <[email protected]>
(cherry picked from commit 0b315eb)
(cherry picked from commit eab2bb5)
Signed-off-by: Zixuan Liu <[email protected]>
… in ModularLoadManagerImpl (apache#19656)

(cherry picked from commit 145e985)
Signed-off-by: Zixuan Liu <[email protected]>
When a broker in the cluster is not active, its load still remain in the memory of the Leader.
If deployed in a container, brokers will scale up and down frequently, and the memory of the Leader gradually increase

(cherry picked from commit 7e0a6c4)
Signed-off-by: Zixuan Liu <[email protected]>
…ion when selectBroker use LeastResourceUsageWithWeight (apache#16573)

* fix the zero value as denominator cause ArithmeticException

* fix the zero value as denominator cause ArithmeticException

Co-authored-by: nicklixinyang <[email protected]>
(cherry picked from commit 99fbe22)
…eData access (apache#19889)

Co-authored-by: lordcheng10 <[email protected]>
(cherry picked from commit 19c8497)
…data. sec ver. (apache#20620)

Co-authored-by: wangjinlong <[email protected]>
(cherry picked from commit f2f0bf4)
…edder (apache#22949)

Co-authored-by: Kai Wang <[email protected]>
Co-authored-by: Yunze Xu <[email protected]>

(cherry picked from commit c160cc9)
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
@nodece
Copy link
Collaborator Author

nodece commented Jul 24, 2024

PASSED

@nodece nodece closed this Jul 24, 2024
@nodece nodece deleted the AvgShedder-2.10 branch July 24, 2024 03:25
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.