I want to create a rabbitMQ cluster that is very resilient to failures.
So far I've managed to create a cluster with three nodes, each of these nodes runs inside a docker container. To enable the nodes to join a cluster, the hosts needs to know each other via links.
Now, the whole architecture runs in the cloud (on AWS to be precise). So far, my containers can only be linked with one another, when they run on the same AWS-instance. I want to create the cluster in a way that nodes can lie on diffrent hosts.
So far I've tried:
Using federation / shovel instead. This does not serve my purpose, because I need CP from the CAP-Theorem and not CA. I need my nodes to be all replicas of one another and to be able to act as the same broker to clients.
Creating a docker swarm. I am able to set-up the docker swarm and connect two instances via docker swarm. But if I try to run multiple rabbit-containers on this swarm, they either are placed on the same node or I cannot link them with one another. So I end up with the same constellation, of all my hosts running on the same node.
Is there any solution or other approach, with which I could create a rabbitmMQ-cluster inside docker containers among different AWS-instances / hosts?