momo-jun commented on code in PR #18675: URL: https://github.com/apache/pulsar/pull/18675#discussion_r1035469195
########## site2/docs/administration-load-balance.md: ########## @@ -132,6 +132,18 @@ This strategy tends to shed the bundles if any broker's usage is above the confi For example, assume you have three brokers, the average broker usage of broker1 is 40%, the average broker usage of broker2 and broker3 is 10%, then the cluster average usage is 20% ((40% + 10% + 10%) / 3). If you set `loadBalancerBrokerThresholdShedderPercentage` to `10`, then only broker1's certain bundles get unloaded, because the average usage of broker1 is greater than the sum of the cluster average usage (20%) plus `loadBalancerBrokerThresholdShedderPercentage`(10%). +However, in some special cases, the above default strategy may cause low-load machines to be idle forever. + +For example: + +There are 11 brokers, of which 10 are loaded at 80% and 1 is loaded at 0%. +The average load is 80% * 10 / 11 = 72.73%, and the threshold to unload is 72.73% + 10% = 82.73%. +Since 80% < 82.73%, unload will not be triggered, and there is one idle Broker with load of 0%. + +So, we add a new option `lowerBoundarySheddingEnabled`. +If `lowerBoundarySheddingEnabled=true`, based on the `ThresholdShedder`, a leader will make the lower boundary judgment of the load. +When `current usage < average usage - threshold` (e.g. 0% < 82.73% - 10%), the broker with the highest load will be triggered to unload. Review Comment: ```suggestion If `current usage` is less than `average usage - lower boundary load`, e.g., 0% < (82.73% - 10%), the broker with the highest load will be triggered to unload. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
