A
A
Alexander Ivanov2018-12-13 08:51:07
Python
Alexander Ivanov, 2018-12-13 08:51:07

Why does rabbitmq have such poor performance?

We have a microservice architecture on the project. We use the RPC pattern (tornado + pika). For each result, a queue is created with an ID in rabbitmq. And with a large number of queues (the more queues, the stronger), performance drops, and the number of workers does not matter. Somewhere at 50RPS, rabbitmq gets stuck, although the workers are executing commands. We tested the same thing with Redis, just put the result into it with the command id, it takes out about 400RPS. Are we preparing rabbitmq incorrectly, or is it such a specificity? Maybe there are some better solutions for implementing rpc in a microservice architecture?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey, 2018-12-13
@Lazoreth

In Google, according to the words "rabbitmq" and "rpc", a link to the official documentation on Direct reply-to is issued , have you tried such a mechanism? Creating/deleting a queue for the sake of getting one response is very expensive. 50/400rpc is nothing at all, even for RabbitMQ (of course, everything depends on allocated resources, disk storage, etc.).

A
Andrey, 2018-12-13
@VladimirAndreev

Something tells you that you have a strange architecture...

A
asd111, 2018-12-13
@asd111

It slows down due to the fact that a queue is created for each response. rabbitmq advises using direct reply to to improve performance https://pika.readthedocs.io/en/0.12.0/examples/dir...

A
Artyom Innokentiev, 2018-12-13
@artinnok

You can try clustering for RabbitMQ and play around with the settings.
There is also an option to use Apache Kafka - a more powerful and high-performance solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question