Tuning the performance of a system is, in many cases, a nontrivial process that is conducted gradually over time. This also applies to the message broker itself. The RabbitMQ team has done a pretty good job in optimizing the various bits and pieces of the broker over time. One such example is topic exchanges. Version 2.4.0 significantly improved the performance of message routing from topic exchanges using a tire data structure. Another one is the significant improvement in performance predictability in version 2.8.1 during the heavy loading of the message broker due to improved memory management. However, there are many scenarios that require the tuning of the broker based on the usage patterns and properties of the system, as we shall see in this chapter.
To understand better how to tune the performance of our broker, let's take a look at the standard three-tier broker setup: