# Chapter 3 Load Balancing Algorithm - Placement Strategy

In Chapter 2, we introduced all the implementations of the `LoadSheddingStrategy`. In this chapter, we will delve into the implementation principles of the placement strategy and discuss the effects of combining different placement strategies with different `LoadSheddingStrategy` implementations. Ultimately, we will present a scoring table that allows readers to clearly see the strengths and weaknesses of different algorithm combinations.

The placement strategy is controlled by the configuration `loadBalancerLoadPlacementStrategy`, with the default being the `LeastLongTermMessageRate` strategy.

```
# load balance placement strategy, support LeastLongTermMessageRate and LeastResourceUsageWithWeight
loadBalancerLoadPlacementStrategy=org.apache.pulsar.broker.loadbalance.impl.LeastLongTermMessageRate
```

The implemented interface is named `org.apache.pulsar.broker.loadbalance.ModularLoadManagerStrategy`, and there are four implementations. Among them, `RoundRobinBrokerSelector` is usually not considered because it places bundles using a round robin method without considering key information such as load data. In the following sections, we will focus on the `LeastLongTermMessageRate` and `LeastResourceUsageWithWeight` implementations, while the content related to `AvgShedder` will be covered in the next chapter.

<figure><img src="/files/fHDAOrtWF3jYjRaO9UNz" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
