Skip to content

Commit

Permalink
Added loadBalancerBundleUnloadMinThroughputThreshold description
Browse files Browse the repository at this point in the history
  • Loading branch information
heesung-sn committed Apr 11, 2024
1 parent d760298 commit ec85618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/administration-load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Pulsar supports the following types of automatic load shedding strategies.

### ThresholdShedder

This strategy tends to shed the bundles if any broker's usage is above the configured threshold. It does this by first computing the average resource usage per broker for the whole cluster. The resource usage for each broker is calculated using the following method `LocalBrokerData#getMaxResourceUsageWithWeight`. Historical observations are included in the running average based on the broker's setting for `loadBalancerHistoryResourcePercentage`. Once the average resource usage is calculated, a broker's current/historical usage is compared to the average broker usage. If a broker's usage is greater than the average usage per broker plus the `loadBalancerBrokerThresholdShedderPercentage`, this load shedder proposes removing enough bundles to bring the unloaded broker 5% below the current average broker usage. Note that recently unloaded bundles are not unloaded again.
This strategy tends to shed the bundles if any broker's usage is above the configured threshold. It does this by first computing the average resource usage per broker for the whole cluster. The resource usage for each broker is calculated using the following method `LocalBrokerData#getMaxResourceUsageWithWeight`. Historical observations are included in the running average based on the broker's setting for `loadBalancerHistoryResourcePercentage`. Once the average resource usage is calculated, a broker's current/historical usage is compared to the average broker usage. If a broker's usage is greater than the average usage per broker plus the `loadBalancerBrokerThresholdShedderPercentage`, this load shedder proposes removing enough bundles to bring the unloaded broker 5% below the current average broker usage. Note that recently unloaded bundles are not unloaded again. Also, `loadBalancerBundleUnloadMinThroughputThreshold` must be correctly adjusted based on the broker's throughputs. If the computed throughput to unload is smaller than this, unloading will not be triggered.

![Shedding strategy - ThresholdShedder](/assets/shedding-strategy-thresholdshedder.svg)

Expand Down

0 comments on commit ec85618

Please sign in to comment.