# vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2017-12-16 09:14:31 +0000 (Sat, 16 Dec 2017) # # https://github.com/HariSekhon/HAProxy-configs # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish # # https://www.linkedin.com/in/HariSekhon # # ============================================================================ # # H A P r o x y G l o b a l S e t t i n g s # ============================================================================ # global #log syslog:514 local0 info log 127.0.0.1:514 local0 info #log /dev/log local0 info #log /dev/stdout local0 info tune.bufsize 16384 # default, response size limit, beware for Hue, SQL services # tune.chksize not used in newer HAProxy 2.5, tune.bufsize is used instead #tune.chksize 16384 # default, healthcheck response parsing limit #chroot /var/lib/haproxy #pidfile /var/run/haproxy.pid maxconn 4000 #user haproxy #group haproxy #daemon #stats socket /var/lib/haproxy/stats #stats socket 0.0.0.0:1234 #stats maxconn 20 # default: 10 ssl-server-verify required # default, else 'none' max-spread-checks 2s unix-bind mode 0400 # ============================================================================ # # H A P r o x y D e f a u l t S e t t i n g s # ============================================================================ # defaults log global option logasap option log-separate-errors #option log-health-checks mode http option http-keep-alive # enable more detailed logging of http and tcp sessions option httplog #option tcplog option tcpka #option clitcpka #option srvtcpka # HAProxy 1.7 onwards - ignore unresolvable DNS addresses default-server init-addr last,libc,none # will break cookie persistence if server fails and needs to switch to other server option redispatch #option prefer-last-server # socket level retries not full retries 3 #minconn 50 # for slowstart ramp up maxconn 3000 #fullconn 10000 timeout connect 10s timeout http-request 10s timeout http-keep-alive 10s timeout queue 10s timeout client 10s timeout client-fin 10s timeout server 10s timeout server-fin 10s timeout check 10s timeout tunnel 1h # breaks Hue #option checkcache #option abortonclose #option dontlognull #option http-ignore-probes #option forwardfor #except 127.0.0.0/8 #http-check disable-on-404 # gracefully finish connections if httpchk gets 404 # continuous traffic stats for smoother graphs of longer running connections (eg. images) #option contstats