Skip to content

Instantly share code, notes, and snippets.

@Randommood
Forked from gburd/haproxy.conf
Created October 5, 2012 22:37

Revisions

  1. Gregory Burd revised this gist Feb 16, 2012. 1 changed file with 15 additions and 13 deletions.
    28 changes: 15 additions & 13 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -1,25 +1,27 @@
    # Documentation for HAProxy
    # http://code.google.com/p/haproxy-docs/w/list
    # http://code.google.com/p/haproxy-docs/w/list
    # http://haproxy.1wt.eu/download/1.2/doc/architecture.txt

    # NOTES:
    # open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)

    global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
    maxconn 4096
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    spread-checks 5
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
    maxconn 256000
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    spread-checks 5
    daemon
    #debug
    #quiet
    quiet

    defaults
    log global
    option dontlognull
    option redispatch
    option allbackups
    retries 3
    maxconn 10000
    maxconn 256000
    timeout connect 5000

    backend riak_rest_backend
    @@ -58,4 +60,4 @@ frontend riak_protocol_buffer
    mode tcp
    option tcpka
    option srvtcpka
    default_backend riak_protocol_buffer_backend
    default_backend riak_protocol_buffer_backend
  2. Gregory Burd revised this gist Dec 28, 2011. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,8 @@
    global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
    maxconn 65536
    maxconn 4096
    chroot /var/lib/haproxy
    no option httpclose
    user haproxy
    group haproxy
    spread-checks 5
    @@ -20,10 +19,8 @@ defaults
    option redispatch
    option allbackups
    retries 3
    maxconn 8192
    contimeout 5000
    clitimeout 50000
    srvtimeout 50000
    maxconn 10000
    timeout connect 5000

    backend riak_rest_backend
    mode http
  3. Gregory Burd revised this gist Dec 28, 2011. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,8 @@ frontend riak_rest
    backend riak_protocol_buffer_backend
    balance leastconn
    mode tcp
    option tcpka
    option srvtcpka
    server riak1 riak1.<FQDN>:8087 weight 1 maxconn 1024 check
    server riak2 riak2.<FQDN>:8087 weight 1 maxconn 1024 check
    server riak3 riak3.<FQDN>:8087 weight 1 maxconn 1024 check
    @@ -56,4 +58,7 @@ frontend riak_protocol_buffer
    mode tcp
    option tcplog
    option contstats
    mode tcp
    option tcpka
    option srvtcpka
    default_backend riak_protocol_buffer_backend
  4. Gregory Burd revised this gist Dec 22, 2011. No changes.
  5. Gregory Burd revised this gist Dec 22, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Documentation for HAProxy
    # http://code.google.com/p/haproxy-docs/w/list

    global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
  6. Gregory Burd revised this gist Dec 22, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
    maxconn 8196
    maxconn 65536
    chroot /var/lib/haproxy
    no option httpclose
    user haproxy
  7. Gregory Burd revised this gist Dec 22, 2011. 1 changed file with 0 additions and 15 deletions.
    15 changes: 0 additions & 15 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -22,21 +22,6 @@ defaults
    clitimeout 50000
    srvtimeout 50000

    listen stats :8080
    balance
    mode http
    stats enable
    stats auth me:password

    listen http :
    mode tcp
    option tcplog
    balance roundrobin
    server smtp 192.168.0.1:25 check
    server smtp1 192.168.0.2:25 check
    server smtp2 192.168.0.3:25 check
    server smtp3 192.168.0.4:25 check

    backend riak_rest_backend
    mode http
    balance roundrobin
  8. Gregory Burd revised this gist Dec 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@ global
    log 127.0.0.1 local1 notice
    maxconn 8196
    chroot /var/lib/haproxy
    no option httpclose
    user haproxy
    group haproxy
    spread-checks 5
    @@ -41,7 +42,6 @@ backend riak_rest_backend
    balance roundrobin
    option httpchk GET /ping
    option httplog
    no option httpclose
    server riak1 riak1.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak2 riak2.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak3 riak3.<FQDN>:8098 weight 1 maxconn 1024 check
  9. Gregory Burd revised this gist Dec 21, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -41,6 +41,7 @@ backend riak_rest_backend
    balance roundrobin
    option httpchk GET /ping
    option httplog
    no option httpclose
    server riak1 riak1.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak2 riak2.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak3 riak3.<FQDN>:8098 weight 1 maxconn 1024 check
  10. Gregory Burd revised this gist Dec 21, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ global
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    spread-checks 5
    daemon
    #debug
    #quiet
  11. Gregory Burd created this gist Dec 21, 2011.
    69 changes: 69 additions & 0 deletions haproxy.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,69 @@
    global
    log 127.0.0.1 local0
    log 127.0.0.1 local1 notice
    maxconn 8196
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    daemon
    #debug
    #quiet

    defaults
    log global
    option dontlognull
    option redispatch
    option allbackups
    retries 3
    maxconn 8192
    contimeout 5000
    clitimeout 50000
    srvtimeout 50000

    listen stats :8080
    balance
    mode http
    stats enable
    stats auth me:password

    listen http :
    mode tcp
    option tcplog
    balance roundrobin
    server smtp 192.168.0.1:25 check
    server smtp1 192.168.0.2:25 check
    server smtp2 192.168.0.3:25 check
    server smtp3 192.168.0.4:25 check

    backend riak_rest_backend
    mode http
    balance roundrobin
    option httpchk GET /ping
    option httplog
    server riak1 riak1.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak2 riak2.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak3 riak3.<FQDN>:8098 weight 1 maxconn 1024 check
    server riak4 riak4.<FQDN>:8098 weight 1 maxconn 1024 check

    frontend riak_rest
    bind 127.0.0.1:8098
    mode http
    option contstats
    default_backend riak_rest_backend


    backend riak_protocol_buffer_backend
    balance leastconn
    mode tcp
    server riak1 riak1.<FQDN>:8087 weight 1 maxconn 1024 check
    server riak2 riak2.<FQDN>:8087 weight 1 maxconn 1024 check
    server riak3 riak3.<FQDN>:8087 weight 1 maxconn 1024 check
    server riak4 riak4.<FQDN>:8087 weight 1 maxconn 1024 check


    frontend riak_protocol_buffer
    bind 127.0.0.1:8087
    mode tcp
    option tcplog
    option contstats
    default_backend riak_protocol_buffer_backend