Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery rpc vs amqp result backend

How does the rpc result backend differ from the amqp backend? I see in the changelog that it replaced it, but although it is written as a protocol (with the ://), the underlying protocol is still amqp, correct?

For instance, result_backend = 'rpc://' vs result_backend = 'amqp://'. If I use rpc as the backend, does it also use SSL when the broker_use_ssl flag is set to true?

like image 348
john Avatar asked Aug 31 '17 06:08

john


1 Answers

Consider a scenario, where 4 clients have to queue 100 tasks each.

In case of amqp backend, it will create 400 unique queues and stores results in those queues.

In case of rpc backend, it will create only 4 queues(1 per client) and stores 100 results in each queue which results in significant improvement in performance as there is no overhead to create queues for each and every task.

For this reason, amqp as backend is deprecated and will be completely removed in next release.

rpc backend uses the same publish/consume mechanism of amqp. If you set broker_use_ssl to True, then it will use SSL.

like image 168
Pandikunta Anand Reddy Avatar answered Sep 28 '22 02:09

Pandikunta Anand Reddy