# thetumbled's library

## Practical Optimization of Apache Pulsar

- [Practical Optimization of Apache Pulsar](https://tumbleds-library.gitbook.io/thetumbleds-library/readme.md)
- [Introduction](https://tumbleds-library.gitbook.io/thetumbleds-library/introduction.md)
- [Chapter 1 Load Balancing Algorithm - Introduction](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-1-load-balancing-algorithm.md)
- [1. Introduction](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-1-load-balancing-algorithm/1.-introduction.md)
- [2. Deficiencies of the Old Algorithms](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-1-load-balancing-algorithm/2-deficiencies-of-the-old-algorithms.md)
- [3. The Birth of AvgShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-1-load-balancing-algorithm/3-the-birth-of-avgshedder.md)
- [4. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-1-load-balancing-algorithm/4-summary.md)
- [Chapter 2 Load Balancing Algorithm - LoadSheddingStrategy](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-2-load-balancing-algorithm-principles-and-analysis-load-shedding-strategy.md)
- [1. ThresholdShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-2-load-balancing-algorithm-principles-and-analysis-load-shedding-strategy/1.-thresholdshedder.md)
- [2. OverloadShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-2-load-balancing-algorithm-principles-and-analysis-load-shedding-strategy/2.-overloadshedder.md)
- [3. UniformLoadShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-2-load-balancing-algorithm-principles-and-analysis-load-shedding-strategy/3.-uniformloadshedder.md)
- [4. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-2-load-balancing-algorithm-principles-and-analysis-load-shedding-strategy/4.-summary.md)
- [Chapter 3 Load Balancing Algorithm - Placement Strategy](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy.md)
- [1. LeastLongTermMessageRate](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy/1.-leastlongtermmessagerate.md)
- [2. LeastResourceUsageWithWeight](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy/2.-leastresourceusagewithweight.md)
- [3. Strategy Selection](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy/3.-strategy-selection.md)
- [4. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-3-load-balancing-algorithm-principles-and-analysis-placement-strategy/4.-summary.md)
- [Chapter 4 Load Balancing Algorithm - Experimental Verification](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-4-load-balancing-algorithm-experimental-verification.md)
- [1. UniformLoadShedder + LeastLongTermMessageRate](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-4-load-balancing-algorithm-experimental-verification/1.-uniformloadshedder-+-leastlongtermmessagerate.md)
- [2. ThresholdShedder + LeastResourceUsageWithWeight](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-4-load-balancing-algorithm-experimental-verification/2.-thresholdshedder-+-leastresourceusagewithweight.md)
- [3. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-4-load-balancing-algorithm-experimental-verification/3.-summary.md)
- [Chapter 5 Load Balancing Algorithm - AvgShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder.md)
- [1. Scoring Algorithm](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/1.-scoring-algorithm.md)
- [2. Multiple Times Trigger](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/2.-multiple-times-trigger.md)
- [3. Placement Strategy](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/3.-placement-strategy.md)
- [4. Production Effect](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/4.-production-effect.md)
- [5. Comparative Experiment](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/5.-comparative-experiment.md)
- [6. Algorithm Rating](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/6.-algorithm-rating.md)
- [7. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-5-load-balancing-algorithm-avgshedder/7.-summary.md)
- [Chapter 6 Load Balancing Algorithm - Practical Manual](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-6-load-balancing-algorithm-practical-manual.md)
- [1. Configuration](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-6-load-balancing-algorithm-practical-manual/1.-configuration.md)
- [2. Monitoring](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-6-load-balancing-algorithm-practical-manual/2.-monitoring.md)
- [3. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-6-load-balancing-algorithm-practical-manual/3.-summary.md)
- [Chapter 7 Production-side Delay Queue](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-7-production-side-delay-queue.md)
- [1. Introduction](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-7-production-side-delay-queue/1.-introduction.md)
- [2. Usage](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-7-production-side-delay-queue/2.-usage.md)
- [3. Principle Analysis](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-7-production-side-delay-queue/3.-principle-analysis.md)
- [4. Summary](https://tumbleds-library.gitbook.io/thetumbleds-library/chapter-7-production-side-delay-queue/4.-summary.md)

* [Apache Pulsar 优化实战](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/readme.md)
* [介绍](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/jie-shao.md)
* [第一章 负载均衡算法--入门](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-yi-zhang-fu-zai-jun-heng-suan-fa-ru-men.md)
* [1. 介绍](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-yi-zhang-fu-zai-jun-heng-suan-fa-ru-men/1.-jie-shao.md)
* [2. 旧算法的缺陷](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-yi-zhang-fu-zai-jun-heng-suan-fa-ru-men/2.-jiu-suan-fa-de-que-xian.md)
* [3. AvgShedder的诞生](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-yi-zhang-fu-zai-jun-heng-suan-fa-ru-men/3.-avgshedder-de-dan-sheng.md)
* [4. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-yi-zhang-fu-zai-jun-heng-suan-fa-ru-men/4.-zong-jie.md)
* [第二章 负载均衡算法--卸载策略LoadSheddingStrategy](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-er-zhang-fu-zai-jun-heng-suan-fa-xie-zai-ce-le-loadsheddingstrategy.md)
* [1. ThresholdShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-er-zhang-fu-zai-jun-heng-suan-fa-xie-zai-ce-le-loadsheddingstrategy/1.-thresholdshedder.md)
* [2. OverloadShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-er-zhang-fu-zai-jun-heng-suan-fa-xie-zai-ce-le-loadsheddingstrategy/2.-overloadshedder.md)
* [3. UniformLoadShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-er-zhang-fu-zai-jun-heng-suan-fa-xie-zai-ce-le-loadsheddingstrategy/3.-uniformloadshedder.md)
* [4. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-er-zhang-fu-zai-jun-heng-suan-fa-xie-zai-ce-le-loadsheddingstrategy/4.-zong-jie.md)
* [第三章 负载均衡算法--放置策略PlacementStrategy](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-san-zhang-fu-zai-jun-heng-suan-fa-fang-zhi-ce-le-placementstrategy.md)
* [1. LeastLongTermMessageRate](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-san-zhang-fu-zai-jun-heng-suan-fa-fang-zhi-ce-le-placementstrategy/1.-leastlongtermmessagerate.md)
* [2. LeastResourceUsageWithWeight](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-san-zhang-fu-zai-jun-heng-suan-fa-fang-zhi-ce-le-placementstrategy/2.-leastresourceusagewithweight.md)
* [3. 策略选择](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-san-zhang-fu-zai-jun-heng-suan-fa-fang-zhi-ce-le-placementstrategy/3.-ce-le-xuan-ze.md)
* [4. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-san-zhang-fu-zai-jun-heng-suan-fa-fang-zhi-ce-le-placementstrategy/4.-zong-jie.md)
* [第四章 负载均衡算法--实验验证](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-si-zhang-fu-zai-jun-heng-suan-fa-shi-yan-yan-zheng.md)
* [1. UniformLoadShedder + LeastLongTermMessageRate](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-si-zhang-fu-zai-jun-heng-suan-fa-shi-yan-yan-zheng/1.-uniformloadshedder-+-leastlongtermmessagerate.md)
* [2. ThresholdShedder + LeastResourceUsageWithWeight](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-si-zhang-fu-zai-jun-heng-suan-fa-shi-yan-yan-zheng/2.-thresholdshedder-+-leastresourceusagewithweight.md)
* [3. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-si-zhang-fu-zai-jun-heng-suan-fa-shi-yan-yan-zheng/3.-zong-jie.md)
* [第五章 负载均衡算法--AvgShedder](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder.md)
* [1. 打分算法](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/1.-da-fen-suan-fa.md)
* [2. 多次触发](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/2.-duo-ci-chu-fa.md)
* [3. 放置策略](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/3.-fang-zhi-ce-le.md)
* [4. 线上效果](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/4.-xian-shang-xiao-guo.md)
* [5. 对比实验](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/5.-dui-bi-shi-yan.md)
* [6. 评分](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/6.-ping-fen.md)
* [7. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-wu-zhang-fu-zai-jun-heng-suan-fa-avgshedder/7.-zong-jie.md)
* [第六章 负载均衡算法--使用指南](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-liu-zhang-fu-zai-jun-heng-shi-yong-zhi-nan.md)
* [1. 配置](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-liu-zhang-fu-zai-jun-heng-shi-yong-zhi-nan/1.-pei-zhi.md)
* [2. 监控](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-liu-zhang-fu-zai-jun-heng-shi-yong-zhi-nan/2.-jian-kong.md)
* [3. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-liu-zhang-fu-zai-jun-heng-shi-yong-zhi-nan/3.-zong-jie.md)
* [第七章 生产端延迟队列](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-qi-zhang-sheng-chan-duan-yan-chi-dui-lie.md)
* [1. 延迟队列介绍](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-qi-zhang-sheng-chan-duan-yan-chi-dui-lie/1.-yan-chi-dui-lie-jie-shao.md)
* [2. 使用方式](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-qi-zhang-sheng-chan-duan-yan-chi-dui-lie/2.-shi-yong-fang-shi.md)
* [3. 原理分析](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-qi-zhang-sheng-chan-duan-yan-chi-dui-lie/3.-yuan-li-fen-xi.md)
* [4. 总结](https://tumbleds-library.gitbook.io/thetumbleds-library/practical-optimization-of-apache-pulsar-1/apache-pulsar-you-hua-shi-zhan/di-qi-zhang-sheng-chan-duan-yan-chi-dui-lie/4.-zong-jie.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
This site has an agentic ask interface you may use to query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://tumbleds-library.gitbook.io/thetumbleds-library/index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
