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

[improve] [broker] make system topic distribute evenly. #22953

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

thetumbled
Copy link
Member

@thetumbled thetumbled commented Jun 21, 2024

Motivation

The loading of TC onto which broker depends on which broker the transaction_coordinator_assign-partition-${TC ID} is loaded onto.

In order to improve service availability, we need to distribute TC evenly across the entire cluster as much as possible, avoiding all TCs from being loaded onto a few machines.

For example, if all 16 TCs are loaded onto two or three brokers, restarting the broker during cluster rolling upgrades will result in a large number of TCs becoming unavailable simultaneously, which will significantly affect the transaction client.

All shedding algorithm pick up the bundles based on throughput or message rate from the top to the bottom. However, the system topic has almost no traffic, which means system topic can't be re-distribute evenly with shedding algo. Placement strategy always want to distribute bundles with the least load broker, so there is high possibility that the bundles of system topic are loaded onto few of brokers.

For example:
count(pulsar_txn_created_total) by (instance)
image
One single broker serve for all 16 TCs.

Modifications

Distribute bundles of system topic evenly forcefully.

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.

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: thetumbled#60

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jun 21, 2024
@thetumbled
Copy link
Member Author

@thetumbled thetumbled changed the title [improve] [broker] load balance for system topic. [improve] [broker] make system topic distribute evenly. Jun 21, 2024
@dao-jun dao-jun added this to the 3.4.0 milestone Jun 21, 2024
@dao-jun dao-jun closed this Jun 21, 2024
@dao-jun dao-jun reopened this Jun 21, 2024
@thetumbled
Copy link
Member Author

/pulsarbot rerun-failure-checks

@lhotari lhotari merged commit 263c694 into apache:master Jun 24, 2024
109 of 119 checks passed
lhotari pushed a commit that referenced this pull request Jun 24, 2024
lhotari pushed a commit that referenced this pull request Jun 24, 2024
lhotari pushed a commit that referenced this pull request Jun 24, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 27, 2024
(cherry picked from commit 263c694)
(cherry picked from commit 2c1fb16)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 1, 2024
(cherry picked from commit 263c694)
(cherry picked from commit 2c1fb16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants