RabbitMQ Best Practices
- Tanzu Kubernetes Grid:
- Use the latest ova image to create Tanzu Kubernetes Grid management and workload cluster that runs Tanzu RabbitMQ cluster.
- Customize and pre-allocate enough CPU and memory resources for the Tanzu Kubernetes Cluster. Refer to Performance Best Practices for Kubernetes with VMware Tanzu for sizing guidance for Tanzu Kubernetes Grid.
- vSAN Storage:
- vSAN supports the dynamic persistent volume provisioning with Storage Policy Based Management (SPBM).
- Failures to Tolerate (FTT) is recommended to set to 1 failure - RAID-1 (Mirroring).
- Enable vSAN Trim/Unmap to allow space reclamation for persistent volumes.
- Tanzu RabbitMQ for Kubernetes:
- Use the latest stable RabbitMQ and Erlang versions.
- It is recommended to use clusters with an odd number of nodes (3, 5, 7, and so on) so that when one node becomes unavailable, the service remains available, and a clear majority of nodes can be identified. See the “Failure tolerance characteristics of clusters of various size” table in https://www.rabbitmq.com/streams.html for details.
- Use the latest stable RabbitMQ and Erlang version.
- As streams persist all data to disks, it is recommended to use the fastest disks possible
- Stream and queue data structures are not competitors, they are suited for different use cases:
- RabbitMQ stream is suited for high throughput, reading simultaneously by multiple applications, and accessing messages from anywhere in the queue. Stream is persistent by default, and the messages are stored directly on disks without minimal memory overhead. Streams are typically more lightweight than queues.
- RabbitMQ queue is suited for long-running tasks or performing reliable background jobs and is used as the middleman between microservices or among legacy applications.
- Using sub-entry batching can increase throughput at the cost of increased latency and potential duplicated messages. Use sub-entry batching when appropriate in your use cases.
Refer to the next two chapters for solution validation performance,
From the action bar MORE button.
Log in to enable this section.