apache / apache/pulsar

[Doc] Incorrect description of UniformLoadShedder in pulsar site.

Open
#22,847 1 comment 0 reactions 0 assignees View on GitHub
doc-required
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### What issue do you find in Pulsar docs?

There are some errors in the description of the UniformLoadShedder.
https://pulsar.apache.org/docs/next/administration-load-balance/#uniformloadshedder

![image](https://github.com/apache/pulsar/assets/52550727/34710a37-3cd8-4be6-9807-90a59bf979a1)

We judge whether MsgRateThresholdExceeded by `(Max-Min)/Min > Threshold` as the graph show. But judge whether MsgThroughputThresholdExceeded by `Max/Min > Threshold`.
```
double msgRateDifferencePercentage = ((maxMsgRate.getValue() - minMsgRate.getValue()) * 100)
/ (minMsgRate.getValue());
double msgThroughputDifferenceRate = maxThroughput.getValue() / minThroughput.getValue();

// if the threshold matches then find out how much load needs to be unloaded by considering number of msgRate
// and throughput.
boolean isMsgRateThresholdExceeded = conf.getLoadBalancerMsgRateDifferenceShedderThreshold() > 0
&& msgRateDifferencePercentage > conf.getLoadBalancerMsgRateDifferenceShedderThreshold();
boolean isMsgThroughputThresholdExceeded = conf
.getLoadBalancerMsgThroughputMultiplierDifferenceShedderThreshold() > 0
&& msgThroughputDifferenceRate > conf
.getLoadBalancerMsgThroughputMultiplierDifferenceShedderThreshold();
```

### What is your suggestion?

Correct the description of UniformLoadShedder.

### Any reference?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Open the UniformLoadShedder section in the Pulsar administration load-balance documentation linked in the issue. Compare its threshold descriptions with the formulas shown in the issue, update the incorrect wording, and verify that the page clearly distinguishes the message-rate and message-throughput calculations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.