RabbitMQ + Docker: pros and cons

2,002 views
Skip to first unread message

Antoine Galataud

unread,
Aug 22, 2016, 12:26:37 PM8/22/16
to rabbitmq-users
Hi all,

This is an open question, my goal here is to learn from people who succeeded or failed deploying RabbitMQ clusters with Docker.
We're currently evaluating the need of such transition, as we want to align our deployments and infra management on docker. For now, the main advantage we see is to have a single way to deploy something on an environment, and use the same scheduling & monitoring tools.

I would be grateful if some of you could give their opinion or share experience on this.

Thx,
Antoine

Daniel Burke

unread,
Aug 22, 2016, 4:55:17 PM8/22/16
to rabbitmq-users
If you need persistence, you need to plan your docker volume usage. For personal projects I've used it in docker with low traffic for over a year without issue, but that use case doesn't require persistence. Other than that, at work we run have more than one dev stack that loads rabbit in docker for development use, and that's worked out very well.

As with anything like this, you should do performance testing to make sure it lives up to your "real world scenarios"


Michael Klishin

unread,
Aug 22, 2016, 5:33:36 PM8/22/16
to rabbitm...@googlegroups.com, Antoine Galataud
Antoine,

I have a strong opinion on this: using contains to run data services is largely pointless (note: execution
schedulers such as Mesos do not necessarily fall into this category even if they use containers
as a deployment mechanism). You will see Docker image-specific
issues, limitations, and so on. And what would you gain? In my opinion, only the warm fuzzy feeling
that you "deploy everything the same way" or "use a cool technology in production".

Unless we are talking about development and CI environments, containers make sense for apps but not data services.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Steven Marcus

unread,
Aug 22, 2016, 9:09:17 PM8/22/16
to rabbitmq-users

My goal was to find a low-admin way of deploying rabbitmq.

To that end. RabbitMQ was deployed on a single VM using the standard rabbitmq docker image.
The VM is running on EC2 and has a separate EBS volume mounted for data persistence.

Here's the script I use to start the image:

docker run -d \

        --name rabbit0 \

        --hostname x.ap-southeast-2.compute.amazonaws.com \

        --restart=always \

-p 5672:5672 \

-p 8080:15672 \

-e RABBITMQ_USE_LONGNAME=true \

-e RABBITMQ_DEFAULT_USER=admin \

-e RABBITMQ_DEFAULT_PASS=x \

-v /mnt/data/rabbit0/:/var/lib/rabbitmq/ \

rabbitmq:3-management



So far it's been convenient because I can upgrade the VM OS and the rabbitmq version as needed -- with downtime.
Upgrades from 3.6.0 through 3.6.5 have been smooth with no known data loss.
It's nice that docker restarts rabbitmq after VM reboot and is responsible for keeping it running in general.

That said, I can't imagine running a cluster with HA requirements this way.
The new "Pet Set" feature in k8s looks worth trying if you need a cluster: http://kubernetes.io/docs/user-guide/petset/ 

I am new to rabbitmq so I hope someone will say if I'm doing something naive or ill-advised?!

Thanks

Daniel Burke

unread,
Aug 23, 2016, 5:52:11 AM8/23/16
to rabbitmq-users

Just a container on a VM is probably making more work that using your OS package manager to keep it up to date.  But we use k8s for a lot of things at work (and our use is growing), that would be a great way to manage deploy and update imo


--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/2g7pGAtZxuo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

Steven Marcus

unread,
Aug 23, 2016, 8:25:46 PM8/23/16
to rabbitmq-users

The docker image was preferred because I use Amazon Linux on EC2 and didn't know if there were issues with the official rabbitmq rpms on Amazon Linux.
So chose to take advantage of one of the core value props of container-based deployment...

Also, using docker lets me change the instance type/size easily, with downtime, while retaining data...

Giri Chintala

unread,
Aug 25, 2016, 1:07:24 AM8/25/16
to rabbitmq-users

I don't think docker adds any value w.r.t resizing and retaining data. Resizing EBS–backed instance is easy.

Docker may be a better solution in  Development and QA environments, as AWS cost can be reduced by running several RabbitMQ docker containers in same EC2 instance.

BTW, We deployed our Production RabbitMQ clusters on AWS RHEL7, no major issues.
Reply all
Reply to author
Forward
0 new messages