Skip to content

Instantly share code, notes, and snippets.

@nakato
Created January 7, 2015 03:12
Show Gist options
  • Save nakato/e7e65af09904c9a905c4 to your computer and use it in GitHub Desktop.
Save nakato/e7e65af09904c9a905c4 to your computer and use it in GitHub Desktop.
A quickly throw together haproxy config for RabbitMQ
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
tune.bufsize 128000
defaults
mode http
log global
maxconn 8000
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
listen rabbitmq
bind 127.0.0.1:5672
mode tcp
option tcpka
timeout client 99999m
timeout server 99999m
balance roundrobin
server rabbit1 192.168.10.1:5672 check inter 5s rise 2 fall 3 on-marked-down shutdown-sessions
server rabbit2 192.168.10.2:5672 check inter 5s rise 2 fall 3 on-marked-down shutdown-sessions
listen stats 192.168.10.3:8080
mode http
stats enable
stats uri /stats
stats realm HAProxy\ Statistics
stats auth openstack:testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment