[rabbitmq-discuss] Only 20 req-resps per second

ssorted selfsorted at gmail.com
Thu Nov 11 01:52:26 GMT 2010


Hi.
I would like to use RabbitMQ for RPC. Example Python scripts I used
are here:
- client - http://dpaste.com/hold/273708/,
- server - http://dpaste.com/hold/273709/

The client script sends 100 requests and waits 100 times for a
response. It is done sequentially for each request: send 1st message,
wait for response for 1st message, send 2nd message ....

Performance is very low: the client.py script needs 4 seconds to
finish which means only 25 requests+responses per second. After
changing the client.py script to first send all requests, and then
consume all responses, it finishes in 0.25 second which means 400
requests+responses per second. But this is not the situation I need to
simulate and bad performance of the original script is a problem for
me.

These scripts use amqplib, I reimplemented them in pika (alternative
AMQP Python library) but without any difference in performance.

The question is: have I implemented the RPC mechanism correctly? And
why the performance is so bad? Can be something done or simply AMQP
isn't suited for high performance RPC?


Regards,
Artur


More information about the rabbitmq-discuss mailing list