Skip to content

Instantly share code, notes, and snippets.

@nedludd
Created March 25, 2013 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nedludd/5240846 to your computer and use it in GitHub Desktop.
Save nedludd/5240846 to your computer and use it in GitHub Desktop.
Prod HAProxy Config
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
pidfile /var/run/haproxy.pid
stats socket /var/run/haproxy/haproxy.sock mode 0600 level admin
maxconn 500
user dayview
group dayview
daemon
#debug
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
option tcplog
option logasap
log global
option dontlognull
option redispatch
retries 3
contimeout 5000
clitimeout 50000
srvtimeout 50000
#---------------------------------------------------------------------
# Statistics
#---------------------------------------------------------------------
listen stats :8888
mode http
stats enable
stats hide-version
stats realm DayView\ Haproxy\ Statistics
stats uri /
#---------------------------------------------------------------------
# Rabbit MQ Cluster
#---------------------------------------------------------------------
listen rabbitmq 68.87.108.166:5672
mode tcp
balance roundrobin
option tcpka
server rabbit01 68.87.108.166:15672 check inter 5000 downinter 500
server rabbit02 68.87.108.201:15672 check inter 5000 downinter 500
listen rabbitmq-api 68.87.108.166:55672
mode tcp
balance roundrobin
option tcpka
server rabbit01 68.87.108.166:55555 check inter 5000 downinter 500
server rabbit02 68.87.108.201:55555 check inter 5000 downinter 500
#---------------------------------------------------------------------
# Storm DRPC
#---------------------------------------------------------------------
listen storm-drpc 68.87.108.166:33772
balance roundrobin
mode tcp
server storm-drpc1 68.87.108.198:3772 check
server storm-drpc2 68.87.108.199:3772 check
server storm-drpc3 68.87.108.200:3772 check
server storm-drpc4 68.87.108.201:3772 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment