Skip to content

Instantly share code, notes, and snippets.

@damonsk
Last active April 4, 2017 07:39
Show Gist options
  • Save damonsk/f5d20dfdd62c2eb47ab9 to your computer and use it in GitHub Desktop.
Save damonsk/f5d20dfdd62c2eb47ab9 to your computer and use it in GitHub Desktop.
haproxy for rabbitmq docker
global
log 127.0.0.1 local1
maxconn 4096
#chroot /usr/share/haproxy
uid 99
gid 99
#debug
#quiet
defaults
log global
mode tcp
option tcplog
retries 3
option redispatch
maxconn 2000
timeout connect 5000
timeout client 50000
timeout server 50000
listen stats :1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
listen web-proxy 0.0.0.0:15670
mode http
balance roundrobin
server RABBIT1 192.168.59.103:15673
server RABBIT2 192.168.59.103:15674
listen aqmp_front :5672
mode tcp
balance roundrobin
timeout client 3h
timeout server 3h
option clitcpka
server RABBIT1 192.168.59.103:5673 check inter 5s rise 2 fall 3
server RABBIT2 192.168.59.103:5674 check inter 5s rise 2 fall 3
@ypereirareis
Copy link

Hi !
Thx for sharing this 😃

I built a docker based project allowing to run a highly available RabbitMQ cluster with HAProxy.

You can find it there: https://github.com/ypereirareis/docker-rabbitmq-ha-cluster
It could give you more information and configuration for HAProxy.

Bye !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment