Is there a way to scale up RabbitMQ RPC?

Viewed 134

Hi I'm using RabbitMQ RPC to distribute tasks to workers (Request/Response) I studied rpc_client.py and rpc_server.py on the RabbitMQ tutorial and I saw to scale up we must run another process (rpc_server). I want to assign about 1k tasks per second but it's too slow Can you help me to solve this problem System Spec RAM : 8GB CPU : Intel® Core™ i7-7700 CPU @ 3.60GHz × 8

1 Answers

In order to scale you can either run multiple processes of python server or use multithreading to handle the requests. Ofcourse it would be important to use a threadsafe client library for RabbitMQ like AMQPStorm. Here is another example of multithreading using Pika library (note that Pika is not threadsafe)

Related