[improve][broker]PIP-255 Add topic metrics for the number of production data requests to add a topic and the average number of messages per request. #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
In the current topic level monitoring, there is no metrics to monitor the number of send data requests and the number of messages per send request (i.e., each entry) for a topic. This is inconvenient for us to troubleshoot the following issues:
In cases where the client does not perform batch data writing or the batch written messages are not very reasonable, we cannot intuitively reflect through monitoring and cannot detect unreasonable business usage in a timely manner; It has a significant impact on production and consumption performance, increasing cluster load, reducing cluster performance, and increasing overall costs;
When we enable the production flow limiting strategy, if the flow limiting condition is triggered by the number of requests on a single connection, it is difficult to accurately locate which topic's high-frequency send data is causing it;
Modifications
Add four metrics:
pulsar_request_rate_in
: Topic send request rate.pulsar_average_msg_per_request
: Average number of messages per send request for topic.pulsar_producer_request_in
: producer send request rate.pulsar_producer_avg_msg_per_request
: Average number of messages per send request for producer.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: