{"id":16770199,"url":"https://github.com/ypereirareis/docker-rabbitmq-ha-cluster","last_synced_at":"2025-03-17T02:31:28.871Z","repository":{"id":58550043,"uuid":"86619676","full_name":"ypereirareis/docker-rabbitmq-ha-cluster","owner":"ypereirareis","description":"A docker stack to create, test and benchmark a rabbitmq cluster in high availability configuration. HAProxy, php workers, node failures, network partition, persistent messages.","archived":false,"fork":false,"pushed_at":"2018-12-19T10:54:55.000Z","size":2808,"stargazers_count":106,"open_issues_count":0,"forks_count":35,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-27T16:47:07.085Z","etag":null,"topics":["cluster","docker","haproxy","oldsound","php-amqplib","rabbitmq","rabbitmq-bundle","rabbitmq-cluster","swarrot"],"latest_commit_sha":null,"homepage":"https://ypereirareis.github.io/blog/2017/04/03/rabbitmq-high-available-cluster-haproxy-docker/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ypereirareis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-29T19:08:46.000Z","updated_at":"2024-04-25T22:08:28.000Z","dependencies_parsed_at":"2022-09-04T07:42:56.773Z","dependency_job_id":null,"html_url":"https://github.com/ypereirareis/docker-rabbitmq-ha-cluster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fdocker-rabbitmq-ha-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fdocker-rabbitmq-ha-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fdocker-rabbitmq-ha-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ypereirareis%2Fdocker-rabbitmq-ha-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ypereirareis","download_url":"https://codeload.github.com/ypereirareis/docker-rabbitmq-ha-cluster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841125,"owners_count":20356440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","docker","haproxy","oldsound","php-amqplib","rabbitmq","rabbitmq-bundle","rabbitmq-cluster","swarrot"],"created_at":"2024-10-13T06:23:11.447Z","updated_at":"2025-03-17T02:31:28.535Z","avatar_url":"https://github.com/ypereirareis.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker RabbitMQ HA Cluster\n\n:warning: This project **IS NOT** swarm compatible, sorry... but PR welcome :warning:\n\n[Read the documentation](#documentation)\n\nA docker stack to create, test and benchmark a rabbitmq cluster in high availability configuration:\n\n| Tool        | Version |\n| -------------: |:-----|\n| RabbitMQ      | v3.6.5 |\n| HAProxy      | v1.6.3 |\n| PHP | v7.1 |\n| Docker | v1.12+ |\n| Docker-compose | v1.8+ |\n\n* HAProxy as a load balancer\n* N nodes cluster\n* **Durable**, **Mirrored** and **Persistent** Exchanges, Queues and Messages\n* HA custom policies\n* Parallel producers and consumers\n* **Node failures** and **network partition** experiment\n\nIf you have questions, comments or suggestions please just create issues.\n\n:warning: Tested (works well) on Linux but bad performance on OSX (docker for MAC)\n\n## The architecture\n\n![Rabbit cluster](./img/rabbitmq.png)\n\n * **3 RabbitMQ nodes** but we can add a lot more.\n * **3 docker networks** to be able to simulate network partition.\n * **1 HAProxy node** to load balance request and to be \"failure proof\".\n * **1 default network** for the consumers and producers to connect with nodes through HAProxy.\n\n## The stack\n\nA lot of great tools (thanks to all awesome authors)\n\n* Make\n* Docker and docker-compose\n* Rabbitmq and Management Plugin (docker)\n* [HAProxy](https://github.com/docker/dockercloud-haproxy)\n* Shell scripts\n* Symfony MicroFramework (producers and consumers in docker containers)\n* [swarrot](https://github.com/swarrot/swarrot) / [swarrot-bundle](https://github.com/swarrot/SwarrotBundle)\n* [php-amqplib/rabbitmq-bundle](https://github.com/php-amqplib/RabbitMqBundle)\n* [odolbeau/rabbit-mq-admin-toolkit](https://github.com/odolbeau/rabbit-mq-admin-toolkit)\n\n## Tests / Benchmark\n\nWith this stack you will be able to experiment:\n\n* Load Balancing\n* Node failure\n* Network partition\n* Messages persistency\n* Message NO ACK and retries\n\n# Documentation\n\n## Setup / Start / Stop the cluster\n\n[Read the documentation for Setup / start / stop](./doc/SETUP.md)\n\n## Swarrot/SwarrotBundle\n\n[Read the documentation for Swarrot/SwarrotBundle](./doc/SWARROT.md)\n\n## php-amqplib/RabbitMqBundle\n\n[Read the documentation for php-amqplib/RabbitMqBundle](./doc/OLDSOUND.md)\n\n## Tests/Benckmark\n\n### Node failures\n\n[Read the documentation for node failures](./doc/FAILURE.md)\n\n### Network partition\n\n[Read the documentation for network partition](./doc/PARTITION.md)\n\n## Big cluster\n\n[Read the documentation for big cluster](./doc/BIG.md)\n\n## TODO\n\n* Tests\n\n## Resources\n\n* http://blog.eleven-labs.com/fr/publier-consommer-reessayer-des-messages-rabbitmq/\n* https://odolbeau.fr/blog/benchmark-php-amqp-lib-amqp-extension-swarrot.html\n* https://github.com/docker/dockercloud-haproxy\n* https://github.com/bijukunjummen/docker-rabbitmq-cluster\n* https://www.rabbitmq.com/ha.html\n* https://www.rabbitmq.com/persistence-conf.html\n* https://github.com/php-amqplib/RabbitMqBundle\n* https://github.com/swarrot\n* http://symfony.com/doc/current/configuration/micro_kernel_trait.html\n* https://docs.docker.com/engine/userguide/networking/\n* https://www.nginx.com/resources/admin-guide/tcp-load-balancing/\n* https://github.com/alanxz/rabbitmq-c\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Yannick Pereira-Reis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fypereirareis%2Fdocker-rabbitmq-ha-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fypereirareis%2Fdocker-rabbitmq-ha-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fypereirareis%2Fdocker-rabbitmq-ha-cluster/lists"}