Use tcp instead of http for LB

This commit is contained in:
Ante Karamatic 2014-03-01 19:09:28 +01:00
parent a7c8d88dbb
commit 38bfc0e54f

View File

@ -8,8 +8,8 @@ global
defaults defaults
log global log global
mode http mode tcp
option httplog option tcplog
option dontlognull option dontlognull
retries 3 retries 3
timeout queue 1000 timeout queue 1000
@ -19,6 +19,7 @@ defaults
listen stats :8888 listen stats :8888
mode http mode http
option httplog
stats enable stats enable
stats hide-version stats hide-version
stats realm Haproxy\ Statistics stats realm Haproxy\ Statistics
@ -29,7 +30,6 @@ listen stats :8888
{% for service, ports in service_ports.iteritems() -%} {% for service, ports in service_ports.iteritems() -%}
listen {{ service }} 0.0.0.0:{{ ports[0] }} listen {{ service }} 0.0.0.0:{{ ports[0] }}
balance roundrobin balance roundrobin
option tcplog
{% for unit, address in units.iteritems() -%} {% for unit, address in units.iteritems() -%}
server {{ unit }} {{ address }}:{{ ports[1] }} check server {{ unit }} {{ address }}:{{ ports[1] }} check
{% endfor %} {% endfor %}