-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
topic publish rate limit not take effect #6975
Comments
@aloyszhang Thanks for the feedback, I think this is an enhancement. I would like to change the tag to enhancement. |
@codelipenghui Thanks for your suggestion, LGTM. |
@aloyszhang I think we can add options in the broker.conf. So that users can choose the precise rate control or not. If users don't care about the cost of the competition, they can choose the precise rate control. |
@codelipenghui OK, I'll add the option. |
Fixes #6975 ### Motivation For now, pulsar limits publish rate of topic by a period task runs every `topicPublisherThrottlingTickTimeMillis`. That means in the time `topicPublisherThrottlingTickTimeMillis`, the limit can't take effect. This PR enable precise topic publish rate limit on broker.
Fixes apache#6975 ### Motivation For now, pulsar limits publish rate of topic by a period task runs every `topicPublisherThrottlingTickTimeMillis`. That means in the time `topicPublisherThrottlingTickTimeMillis`, the limit can't take effect. This PR enable precise topic publish rate limit on broker.
Fixes apache#6975 ### Motivation For now, pulsar limits publish rate of topic by a period task runs every `topicPublisherThrottlingTickTimeMillis`. That means in the time `topicPublisherThrottlingTickTimeMillis`, the limit can't take effect. This PR enable precise topic publish rate limit on broker.
Describe the bug
set-publish-rate
does not take effectTo Reproduce
set-publish-rate
Expected behavior
producer should not publish messages faster than the publish rate
Screenshots
publish rate limit information
do publish
As shown, under the limit of 10 msgs and 10240 bytes, when send message with 1024B bytes, it should not be faster than 10msg/s.
But the tes result is much more than 10msg/s.
Additional context
As my researching , pulsar do topic publish rate limit using two individual thread,
one thread schedule task that sums up publish-rate across all cnx on a topic and another schedule task that refreshes rate-limiting bucket.
This means we can only pause publish after send message for
topicPublisherThrottlingTickTimeMillis
long times, and messages send beforetopicPublisherThrottlingTickTimeMillis
will never trigger rate limit.In order to get efficient publish rate limit, I think, we should use something like
RateLimiter
instead of a period task.The text was updated successfully, but these errors were encountered: