Skip to content

[feat][broker] introduce precise broker publish rate limiting - #20292

Closed
lordcheng10 wants to merge 2 commits into
apache:masterfrom
lordcheng10:broker_precise_rate_limit
Closed

[feat][broker] introduce precise broker publish rate limiting#20292
lordcheng10 wants to merge 2 commits into
apache:masterfrom
lordcheng10:broker_precise_rate_limit

Conversation

@lordcheng10

@lordcheng10 lordcheng10 commented May 10, 2023

Copy link
Copy Markdown
Contributor

Motivation

The publish rate limit for each broker is ineffective, and the reason for this problem is the same as #7078;

Modifications

When preciseTopicPublishRateLimiterEnable=true, use PrecisPublishLimiter as the publish rate limit for each broker.

A comparative test:
test steps:
1.Start prducer perf, the qps of broker is 10w/s:
image
2.Enable broker speed limit:
sh bin/pulsar-admin brokers update-dynamic-config --config brokerPublisherThrottlingMaxMessageRate --value 50000

3.The speed limit effect is as follows: Broker write rate limit does not take effect
image

4.Use the improved precision speed limit feature:It can be seen that the speed limit effect is as expected
image

Documentation

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

Matching PR in forked repository

PR in forked repository: lordcheng10#49

@lordcheng10

Copy link
Copy Markdown
Contributor Author

@codelipenghui PTAL,thanks!

@lordcheng10

Copy link
Copy Markdown
Contributor Author

@Jason918 PTAL,thanks!

@lordcheng10

Copy link
Copy Markdown
Contributor Author

@aloyszhang PTAL,thanks!

@lifepuzzlefun

Copy link
Copy Markdown
Contributor

@lordcheng10 nice patch~ can you add a unit test to simulate this, maybe just check rate is below the setting is enough.

@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the Stale label Jun 16, 2023
@Technoboy- Technoboy- added this to the 3.2.0 milestone Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari

lhotari commented Oct 9, 2024

Copy link
Copy Markdown
Member

Rate limiting was revisited in Pulsar 3.2.0 with PIP-322. Closing this PR.

@lhotari lhotari closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants