Skip to content

Instantly share code, notes, and snippets.

@viglesiasce
Created April 17, 2014 08:26
Show Gist options
  • Select an option

  • Save viglesiasce/10964408 to your computer and use it in GitHub Desktop.

Select an option

Save viglesiasce/10964408 to your computer and use it in GitHub Desktop.
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
no option httpclose
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend euca
bind 0.0.0.0:80
mode http
option httplog
capture request header Host len 64
default_backend euca
frontend eucaconsole
bind 0.0.0.0:443 ssl crt /etc/eucaconsole/console.key
option httplog
capture request header Host len 64
default_backend eucaconsole
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend euca
mode http
balance roundrobin
server api1 10.111.5.155:8773 check
server api2 10.111.5.165:8773 check
server api3 10.111.5.157:8773 check
server api4 10.111.5.177:8773 check
server api5 10.111.5.156:8773 check
server api6 10.111.5.159:8773 check
backend eucaconsole
mode http
balance roundrobin
cookie EUCACONSOLE insert
server con1 10.111.5.155:8888 cookie check
server con2 10.111.5.165:8888 cookie check
server con3 10.111.5.157:8888 cookie check
server con4 10.111.5.177:8888 cookie check
server con5 10.111.5.156:8888 cookie check
server con6 10.111.5.159:8888 cookie check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment