Skip to content

Instantly share code, notes, and snippets.

@rjhowe
Created May 26, 2016 17:12
Show Gist options
  • Save rjhowe/ca8bf04e88fba2b036accfc18b1a4004 to your computer and use it in GitHub Desktop.
Save rjhowe/ca8bf04e88fba2b036accfc18b1a4004 to your computer and use it in GitHub Desktop.
[root@infra ~]# cat /etc/haproxy/haproxy.cfg
# Global settings
#---------------------------------------------------------------------
global
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 20000
user haproxy
group haproxy
daemon
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
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 300s
timeout server 300s
timeout http-keep-alive 10s
timeout check 10s
maxconn 20000
listen stats :9000
mode http
stats enable
stats uri /
frontend atomic-openshift-api
bind *:443
default_backend atomic-openshift-api
mode tcp
option tcplog
backend atomic-openshift-api
balance source
mode tcp
server master0 192.168.0.9:443 check
server master1 192.168.0.6:443 check
server master2 192.168.0.8:443 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment