Skip to content

Latest commit

 

History

History
130 lines (90 loc) · 4.2 KB

README.md

File metadata and controls

130 lines (90 loc) · 4.2 KB

Docker RabbitMQ HA Cluster

⚠️ This project IS NOT swarm compatible, sorry... but PR welcome ⚠️

Read the documentation

A docker stack to create, test and benchmark a rabbitmq cluster in high availability configuration:

Tool Version
RabbitMQ v3.6.5
HAProxy v1.6.3
PHP v7.1
Docker v1.12+
Docker-compose v1.8+
  • HAProxy as a load balancer
  • N nodes cluster
  • Durable, Mirrored and Persistent Exchanges, Queues and Messages
  • HA custom policies
  • Parallel producers and consumers
  • Node failures and network partition experiment

If you have questions, comments or suggestions please just create issues.

⚠️ Tested (works well) on Linux but bad performance on OSX (docker for MAC)

The architecture

Rabbit cluster

  • 3 RabbitMQ nodes but we can add a lot more.
  • 3 docker networks to be able to simulate network partition.
  • 1 HAProxy node to load balance request and to be "failure proof".
  • 1 default network for the consumers and producers to connect with nodes through HAProxy.

The stack

A lot of great tools (thanks to all awesome authors)

Tests / Benchmark

With this stack you will be able to experiment:

  • Load Balancing
  • Node failure
  • Network partition
  • Messages persistency
  • Message NO ACK and retries

Documentation

Setup / Start / Stop the cluster

Read the documentation for Setup / start / stop

Swarrot/SwarrotBundle

Read the documentation for Swarrot/SwarrotBundle

php-amqplib/RabbitMqBundle

Read the documentation for php-amqplib/RabbitMqBundle

Tests/Benckmark

Node failures

Read the documentation for node failures

Network partition

Read the documentation for network partition

Big cluster

Read the documentation for big cluster

TODO

  • Tests

Resources

License

The MIT License (MIT)

Copyright (c) 2017 Yannick Pereira-Reis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.