Report this

What is the reason for this report?

How to set up RabbitMQ as an App Platform Worker?

Posted on March 26, 2021

Hi - I’m looking to run a rabbitmq-server process on a worker in the App Platform. I’m running Django Rest and need a way to run asyncronous tasks. Am I better off setting up a service, moving to a managed Redis solution, or setting up my own droplet for this?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

Indeed, as you mentioned, when considering the use of RabbitMQ or an alternative for asynchronous tasks with Django Rest on DigitalOcean’s App Platform, you have two optimal choices: using a DigitalOcean Managed Redis cluster or deploying RabbitMQ on a DigitalOcean Droplet.

  1. DigitalOcean Managed Redis:

    • This is a straightforward, scalable, and reliable choice if you’re open to using Redis instead of RabbitMQ.
    • Libraries such as Celery, which is popular with Django, support Redis as a message broker. This allows you to run asynchronous tasks with Redis as the backend.
    • By opting for this managed solution, you minimize operational overhead. DigitalOcean takes care of maintenance, backups, and scaling for the managed Redis instance.
  2. DigitalOcean Droplet for RabbitMQ:

    • If you’re set on using RabbitMQ, then deploying it on a Droplet is the best approach. This provides you with full control over RabbitMQ’s setup, configuration, and maintenance.
    • You can seamlessly integrate this RabbitMQ instance with your Django Rest application running on the App Platform.
    • It’s crucial to ensure the Droplet is secured properly. Additionally, consider automating backups to enhance resilience.

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.