Course contentsShow
← System Design
Lesson 677 of 1,91918. Message Queues and BrokersFree lesson

Message Broker Performance Characteristics

Throughput benchmarks, latency profiles, and scaling characteristics of different brokers.

Message Broker Performance Characteristics

You'll learn: How to evaluate and compare message brokers using throughput, latency, and scaling benchmarks to choose the right tool for your workload.

Understanding Performance Dimensions

When selecting a message broker, performance isn't a single number—it's a multi-dimensional profile. The three critical characteristics are:

Throughput measures how many messages per second a broker can handle. RabbitMQ typically achieves 4,000-40,000 messages/sec depending on message size and persistence settings. Kafka (covered later) can handle millions. Amazon SQS scales elastically but has request-rate limits per queue. Redis as a message broker is extremely fast (100K+ msgs/sec) but trades durability for speed.

Latency describes end-to-end message delivery time. In-memory brokers like Redis and NATS deliver sub-millisecond latency. RabbitMQ typically ranges from 1-10ms depending on configuration. Cloud services like Amazon SQS and Google Cloud Pub/Sub introduce network latency (20-100ms) but offer infinite scale.

Scaling characteristics reveal how performance changes with growth. Some brokers scale vertically (bigger machines), others horizontally (more nodes). RabbitMQ clusters add redundancy but don't multiply throughput—queue masters become bottlenecks. Amazon SQS and Azure Service Bus scale automatically behind the scenes. Redis requires manual sharding for horizontal scale.

The Performance Triangle

Think of choosing a broker like picking a vehicle: a sports car (Redis/NATS) is fast but seats two; a bus (RabbitMQ/ActiveMQ) balances speed and capacity; a freight train (cloud services) moves massive cargo but takes longer to start.

Performance also depends on your choices: persistent messages slow throughput but prevent data loss. Message size matters—small messages allow higher throughput. Acknowledgment modes trade reliability for speed.

Key Takeaway: Message broker performance is a tradeoff between throughput, latency, and scalability—benchmark with your actual workload patterns and message sizes to make informed decisions, as synthetic benchmarks rarely match production behavior.