Amazon MQ for RabbitMQ sizing guidelines
You can choose the broker instance type that best supports your application. When choosing an instance type, it is important to consider factors that will affect broker performance:
-
the number of clients and queues
-
the volume of messages sent
-
messages kept in memory
-
redundant messages
Smaller broker instance types (t3.micro
) are recommended only for testing application performance.
We recommend larger broker instance types (m5.large
and above) for production levels
of clients and queues, high throughput, messages in memory, and redundant messages.
It is important to test your brokers to determine the appropriate instance type and size for your workload messaging requirements. Use the following sizing guidelines to determine the best appropriate instance type for your application.
Sizing guidelines for single instance deployment
The following table shows the maximum limit values for each instance type for single instance brokers.
Instance Type | Connections | Channels | Queues | Consumers per channel | Shovels |
---|---|---|---|---|---|
t3.micro | 500 | 1,500 | 2,500 | 1,000 | 150 |
m5.large | 5,000 | 15,000 | 30,000 | 1,000 | 250 |
m5.xlarge | 10,000 | 30,000 | 60,000 | 1,000 | 500 |
m5.2xlarge | 20,000 | 60,000 | 120,000 | 1,000 | 1,000 |
m5.4xlarge | 40,000 | 120,000 | 240,000 | 1,000 | 2,000 |
Sizing guidelines for cluster deployment
The following table shows the maximum limit values for each instance type for cluster brokers.
Instance Type | Connections | Channels | Queues | Consumers per channel | Shovels |
---|---|---|---|---|---|
m5.large | 15,000 | 45,000 | 10,000 | 1,000 | 150 |
m5.xlarge | 30,000 | 90,000 | 15,000 | 1,000 | 300 |
m5.2xlarge | 60,000 | 180,000 | 20,000 | 1,000 | 600 |
m5.4xlarge | 120,000 | 360,000 | 30,000 | 1,000 | 1200 |
The connection, channel, and shovel limits are applied per node. The exact limit values for a cluster broker may be lower than the indicated value depending on the number of available nodes and how RabbitMQ distributes resources among the available nodes.
Error messages
The following error messages are returned when limits are exceeded.
All values are based on the m5.large
single instance limits.
Note
The error codes for the following messages may change based on the client library you are using.
Connection
ConnectionClosedByBroker 500 "NOT_ALLOWED - connection refused: node connection limit (500) is reached"
Channel
ConnectionClosedByBroker 1500 "NOT_ALLOWED - number of channels opened on node
'rabbit@ip-10-0-23-173.us-west-2.compute.internal' has reached the maximum allowed limit of (15,000)"
Consumer
ConnectionClosedByBroker: (530, 'NOT_ALLOWED - reached maximum (1,000) of consumers per channel')
Note
The following error messages use the HTTP Management API format.
Queue
{"error":"bad_request","reason":"cannot declare queue 'my_queue': queue limit in cluster (30,000) is reached"}]
Shovel
{"error":"bad_request","reason":"Validation failed\n\ncomponent shovel is limited to 250 per node\n"}
Vhost
{"error":"bad_request","reason":"cannot create vhost 'my_vhost': vhost limit of 4,000 is reached"}